Microsoft Interview Question Software Engineer in Tests

  • microsoft-interview-questions
    1
    of 1 vote
    9
    Answers

    This is one of the interesting questions asked to my friend who had a telephonic with Microsoft recently:

    Question: Imagine you have a device that is used to count the number of leaves in a tree. And it has an output screen which displays how many leaves are present in a tree, plus a start/stop button. Write as many test cases as possible and sort them under as different test buckets as possible.

    - Jeanclaude on July 25, 2012 in United States Report Duplicate | Flag
    Microsoft Software Engineer in Test Testing

Country: United States
Interview Type: Phone Interview


Comment hidden because of low score. Click to expand.
8
of 8 vote

Functional
BoundaryValue
- Tree with 0 Leaves
- Tree with Max possible leaves
- Tree with leaves equal to the max number that can be shown by the display.
- Tree with 1 Leaf
- Tree with Max Display number + 1
Equivalence Classes
Valid Color of leaves
- Green Leaves
- Different color leaves
Quality of Leaves
- Fresh leaves
- Dried Leaves
- Tiny leaves
Invalid
- Leaves from different tree fallen on tree in use

- Press stop button without starting the device, see nothing happens
- press start to start the device, check if counting starts immediately
- Press stop button after starting the device, check if counting stops immediately
- press start button and do not stop the device, check if device stops automatically after counting all leaves
- Screen display should be readable
- Number of leaves counted should match the display (Can be under structural/White Box. counting is correct but displayed value is wrong)

Security
- Display count can’t be modified by anything else other than device.

Interoperability
- Test the interface between display and counter


Non-Functional
Stress
- test the device to count leaves more than its provided limit, or keep leaves which are not from the tree.
Load
- Press start/stop in quick succession and test the behavior. final count should be correct, (system should not lose the counter)
Perf
- Check the performance of the system to see how much time it takes to count xx number of leaves. Is it as per the specifications? Try it multiple times on same tree and see if the amount of time is almost same.

Reliability
- Keep the system running for a long duration - 2 days.

Acceptance & Usability
- Check if the stop and start button are easy to press/release
- Check if the button doesn’t get stuck if pressed frequently

Portability
- Test the device with different types of trees
- Test the device on trees with fruits or flowers only

- Andy@MS on August 22, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
6
of 6 vote

(1) check on a tree with zero leaves
(2) check with too many leaves
(3) check one tree many times
(4) check a smaller tree after checking a larger tree
(5) check a larger tree after smaller tree
(6) try checking the tree with holding device in different position
(7) check from how far u can check the leaves
(8) check from nearer as possible
(9) check from farer as possible
(10) go nearer for checking after going too far
(11) go far for checking after going too nearer
(12) check on a tree who has too many flowers on it
(13) check in foaming whether
(14) check in too hot season, too cold, raing season
(15) see if the button of stop and start is of good quality
(16) check the counting start after pressing start immediately
(17) check counting stops after pressing stop immediately
(18) check by too frequently pressing stop and start and see if it works accordinly
(19) checks it doesn't hang by using too frequently
(20) checks device gets on immediately by pressing on button
(21) checks how long battery works (battery efficency)
(22) check battery on stand by
(23) checks it doesn't get hot by working for too many hours
(24) checks its output doesn't vary by working too many hours

- Anonymous on August 12, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
2
of 2 vote

Clarifying: This tree is a real tree and not a Binary tree.

- Jeanclaude on July 25, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
2
of 2 vote

1) use device in tree with 0 leaf
2) use device in very dense tree..
3)randomly use device in different trees n check they r showng diffrnt result
4)ranmdomly use device with a tree more den once n check with previous data..
5)check the o/p after breaking some leaves..
6)check whether device start working as soon as start button pressed n stop imediately with stop button
7)apply device in different tree wid different color leaves..
8) check whether device is countng only green leaves.
etc..
add more test case..

- Anonymous on July 25, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

check whether device is countng only leaves in tree or also countng the leaves which have fallen down..

- Anonymous on July 25, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

this is not a binary tree.. it is a real tree/plant.

- Jeanclaude on July 25, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

* Check if the device is giving correct results when there is no light, when it is raining, when wind is blowing
* Check if the device works for long time.. press start, roam around in the forest. Or if we already have count of leaves on say some 20 trees, then press start and circle across all these trees, so that count can also be verified
* Increase and decrease the distance between the tree and the device and verify the results
* Check with different sized leaves
* Press start, now check if count decreases when you start plucking the leaves
* Check with a tree containing flowers, does it count flowers too

- Sudhakar on August 08, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Whether it counts a compund leaf as one whole, or whether it counts the leaflets searately might be a good point to consider here.

- Priya on April 14, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

#include<stdio.h>
struct binarysearchtree{ int data; struct binarysearchtree* left; struct binarysearchtree* right;};typedef struct binarysearchtree* tree;int count_leaves(tree T){ if(T==NULL) return 0; else if(T->left==NULL && T->right==NULL) { return 1; } else return count_leaves(T->left)+count_leaves(T->right);}

- lk on July 25, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book walking you through getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More