Microsoft software development engineer in test (SDET) interview questions

Chris Sells writes about the set of tester questions his friend got when being interviewed for Software Development Engineer in Test position at Microsoft Corp.

  1. How would you deal with changes being made a week or so before the ship date?
  2. How would you deal with a bug that no one wants to fix? Both the SDE and his lead have said they won’t fix it.
  3. Write a function that counts the number of primes in the range [1-N]. Write the test cases for this function.
  4. Given a MAKEFILE (yeah a makefile), design the data structure that a parser would create and then write code that iterates over that data structure
    executing commands if needed.
  5. Write a function that inserts an integer into a linked list in ascending order. Write the test cases for this function.
  6. Test the save dialog in Notepad. (This was the question I enjoyed the most).
  7. Write the InStr function. Write the test cases for this function.
  8. Write a function that will return the number of days in a month (not using System.DateTime).
  9. You have 3 jars. Each jar has a label on it: white, black, or white&black. You have 3 sets of marbles: white, black, and
    white&black. One set is stored in one jar. The labels on the jars are guaranteed to be incorrect (i.e. white will not contain white). Which jar would you choose from to give you the best chances of identifying the which set of marbles in is in which jar.
  10. Why do you want to work for Microsoft?
  11. Write the test cases for a vending machine. (Those were the questions I was asked. I had a lot of discussions about how to handle situations. Such as a tester is focused on one part of an SDK. During triage it was determined that that portion of the SDK was not on the critical path, and the tester was needed elsewhere. But the tester continued to test that portion because it is his baby. How would you get him to stop testing that portion and work on what needs to be worked on? Other situations came up like arranging tests into the different testing buckets (functional, stress, perf, etc.).)
This entry was posted in Testing, Windows. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

13 Comments on Microsoft software development engineer in test (SDET) interview questions

  1. Anonymous
    Posted 4/21/2005 at 6:22 pm | Permalink

    #9 this question does not seem to be completely explained but i would say black and white, because if you pick just 1 marble from the jar labeled black and white, thats what is in the whole jar

  2. Kyle M.
    Posted 6/3/2005 at 10:01 am | Permalink

    For question 9, pick one marble from the B&W jar and that tells you everything. Assume you pull one white marble out of the B&W jar. You know from the problem that the B&W jar cannot hold the mixed set of marbles, so it can only hold the all white or all black set, thus your one white example tells you it holds the all white set. Next, think about the jar labled black. From the problem, you know that it cannot hold the all black set, and you already know where the all white set is, so by process of elimination, it must hold the mixed set. Now you know for sure what two of the jars hold, so you know what the final jar holds.

  3. Viswanath
    Posted 8/31/2005 at 2:55 pm | Permalink

    For Question 9: Infact the answer should be any jar.

    Kyle explained the reason when picking up from B&W jar.

    The same can be applied when picking from B or W jar.

  4. Sandeep
    Posted 2/8/2006 at 6:50 am | Permalink

    If we were to choose just the black jar for instance, and we found a white marble in it, then the jar could contain either all whites(W jar) or whites and blacks (WB jar). This gives us no information about the kind of marbles in the Black jar as we did know that the black jar had to contain a white marble even before we began. So we have to choose the WB jar.

  5. Posted 8/31/2006 at 3:44 pm | Permalink

    You can view both the balls in the jar. so, you can open any jar and guess, whats in the other Jars.

  6. Saporis
    Posted 11/19/2006 at 8:13 pm | Permalink

    Just got back from a SDET interview in redmond and I GOT IN!

    These were NOT the questions I was asked, but I’m sure the fact people do research before their interviews is a good sign…but, it’s not about studying, it’s about knowing what you are doing and HOW you get to the answer, NOT the answer it self!

    Talk aloud, be proud, and show your PASSION!

  7. Narender
    Posted 12/11/2006 at 4:21 am | Permalink

    Ans. to quest 11 is given below

    The following list outlines a fairly complete test plan for the vending machine:
    1. Test if the coin deposited state is accounted for:
    To do this, press all the buttons except the ones for inserting coins.
    The correct response from the program should be:
    2. Test if the machine can detect if it is empty of all merchandise:
    to do this, replace the value in the quantity box for all candies with zero then insert any amount of coins and attempt a purchase by pressing any of the candy buttons.
    The correct response from the program should be:
    o any amount inserted into the machine returned in the coin return slot
    o a popped message box with the message “out of stock” and the same message displayed in the panel display box
    3. Test if correct change is given out:
    Test if the purchasing algorithm is correct:
    To do this, insert an amount which is over the price of a particular candy then purchase the candy by pressing the correctly labeled button.
    The correct response from the program should be:
    o The specified candy listed in the candy slot box
    o the quantity of the specified candy decremented by 1
    o the coins inserted either placed in the coin reserves or in the spillover bucket
    o The correct amount of change given out
    o with the correct number of coins dropped from the coin reserves to account for the amount of change.

    Note: this is far from an exhaustive test of the coin return algorithm. In order to verify that the algorithm is reliable in all potential cases it is necessary to really stress it by putting it through a wider range of input values. To do this, it is common practice to use a driver program. In the driver program we test the algorithm by giving it a large subset of all the possible input values (or the entire set of possible input values if the set is finite and the testing time is acceptable). Another method is to mathematically prove the correctness of the algorithm, but this is more difficult to implement.

    4. Test if out of change condition is detected:
    To do this, zero out all coin hold boxes in the vending machine then press the coin return button to reinitialize the program. Press the quarter button to insert a quarter.
    The correct response from the program should be:
    o a popped message box with the message “out of change” and the same message displayed in the panel display box
    o The quarter should be dropped into the coin return box.
    Note: this is far from a exhaustive test of the coin return algorithm. See the previous item.
    5. Test if the price ceiling of the machine is implemented correctly:
    To do this, insert up to $2.00 in coins then insert any valid coin to go over the $2.00 limit.
    The correct response from the program should be:
    o The last coin inserted dropped into the coin return slot.
    o a popped message box with the message “Overlimit” and the same message displayed in the panel display box
    6. Test if program only accepts valid coins:
    To do this, insert an invalid coin.
    The correct response from the program should be: The invalid coin dropped into the coin return slot.
    7. Test if the machine can detect if a specific candy is out of stock.
    To do this, zero out the quantity box of a particular candy then attempt to purchase the candy.
    The correct response from the program should be: a popped message box with the message “out of stock” and the same message displayed in the panel display box.
    8. Test if the machine can detect if the amount inserted is sufficient for purchasing a particular candy:
    To do this, insert an amount which is less than the listed price of a particular candy then attempt to purchase the candy.

    The correct response from the program should be: A popped message box with the message “insufficient funds” and the same message displayed in the panel display box.

    Next insert enough money to buy the candy and try again to purchase it.
    The correct response from the program should be: (see test #3)
    9. Test if coin return function works:
    To do this, insert any amount into the machine then press the coin return button.
    The correct response from the program should be: the amount inserted into the machine dropped into to coin return slot.

  8. Anonynous :)
    Posted 7/10/2007 at 6:20 pm | Permalink

    I interviewed with Microsoft for a SDET position last week and was asked primarily the same questions - I didn’t hit this page until today. Apart from these questions, I was asked several problems related to Linked Lists (which were very easy :) ).
    Anyways, I was offered the job today. I am not quite sure if I want to take this opportunity, and at the same time I don’t want to give away the chance to work for Microsoft as it has always been my dream to work for Microsoft.

    There are several reasons that are making me double-minded:
    1. Ever since I started my career, about 3 years ago, I have been working as a Software Development Engineer in product development or in engineering.
    I have always loved to design and code software, so I am not sure if I am going to like a position in test. Being a developer thru-out my carrer, the word “Test” kinna worries me.

    2. I am located in Chicago, IL, and have no family or friends in Seattle\Redmond\Bellvue area :( Besides, I am used to living in a big city, so I don’t know if I’ll find it exciting to live in Redmond area.

    3. I loved the Microsoft campus - simply awesome :) I would definitely love to work in such a campus

    4. I have always worked with small start ups so far in my career, and it has been my dream to work for Microsoft.

    Considering the above 4 points, I am having a real hard time making a decision. I almost with the position wasn’t offered to me :(
    I think if the position was in Software Development and not in Test, I wouldn’t have hesitated accepting the offer.

    Any comments? Do you know any SDET? Is it a cool job?

  9. MSInternInVaedbek
    Posted 9/16/2007 at 3:15 am | Permalink

    Being an SDET is cool.

    Unlike a dev who has a feature for x years, and spends his last years with fixing bugs in that.(It is quite fustrating I guess ;o))
    The tasks of a tester varies much more.

    And dont be afraid of the 1.) (big vs small) Your feature team who you work with is quite small. You do not have to learn everyones name at MS. ;o)

    But it is true that if you are not like a tester then you maybe wont enjoy being one: Do you feel fun when you find a bug? Do you like to see the face of the devs suffer of it? :evil: Do you think that the customers deserve a better product? If they give you a task and show 3 solution to you find a 4th(5th..) one?

    If yes then you will be a good tester. If not than maybe a good internal test tool developer. Anyhow being SDET good.

  10. ARC
    Posted 11/22/2007 at 9:56 pm | Permalink

    I got a position in SDET in Microsoft. But I like to be in development. Is there any way to shift from testing to development in Microsoft.

  11. Posted 12/16/2007 at 4:48 am | Permalink

    My classmate joined Microsft INdia as a SDET. He was explained that test job in MS is ‘ different’ from test job in other companies. ie you get to code and stuff. but personally I don’t see how that is different from test job in other companies; testers typically write code for testing but still it is secondary to development job ain’t it?

  12. MSTester
    Posted 2/27/2008 at 8:52 pm | Permalink

    It is pretty easy to go from SDET to SDE, there were 4 people on my team who transitioned from SDET to SDE in the last year…. seems to be VERY popular way to leap to dev job, but being a tester is COOL - great variety of projects !

  13. Hari
    Posted 1/7/2009 at 1:59 pm | Permalink

    For Question #9
    Any jar is the correct answer. The black and white color is a red herring. It is just another characteristic of the marble (Just think it is red). So if you have 3 jars and 3 colors, By symmetry it should not matter which jar you pick.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*