Testing Scenarios

Test a Vending machine?
· I’ll try to test it with different coins of the same currency and I’ll see if it gives change back.
· I’ll try to test with different currencies.
· I’ll try to put a fake input coin and see how it reacts to it
· I’ll try to press the menu button before inserting coins.
· I’ll try to press two menu buttons simultaneously.
· I’ll try to press and hold the menu button after I put a coin
· I’ll try to open the door
· I’ll put two coins one after the other before pressing any button and I’ll try to get two items. I’ll try to test if it can manage tasks and etc.
· I’ll test it by putting coins and pressing item button at the same time and I’ll see how it reacts
· I’ll put an item which has a size greater than the hole size of the vending machine and I’ll try to buy that product and If it doesn’t work I’ll try to buy another product, here I’ll try to see if the bigger one blocked the way.
· I’ll flip it up side down and see if it can give me certain item.
· I’ll disconnect the power cord after I put coins and connect it again and press the button and see if it can handle the request which was in the process before the power failure.
· I’ll try to test it if it can operate with different power supplies like main supply and generator etc.
· I’ll try to test its compatibility with the environment.

How would you design the lights at a traffic intersection?

See how creative they are. In particular, synchronizing with lights at other intersections, how they provide smooth flow of traffic (turns etc). Do they consider traffic patterns (rush hour/ special event/ emergency vehicles)?
Solution

There are so many processes to consider these are as follows
· Serving traffic moving straight from east to west
· Serving traffic coming from east and turning to the right at the intersection
· Serving traffic coming from east and turning to the left at the intersection
· Serving traffic moving straight from west to east
· Serving traffic moving from west and turning to the right at the intersection
· Serving traffic coming from west and turning to the left at the intersection
· Serving traffic moving straight from north to south
· Serving traffic coming from north and turning to the right at the intersection
· Serving traffic coming from north and turning to the left at the intersection
· Serving traffic moving straight from south to north
· Serving traffic coming from south and turning to the right at the intersection
· Serving traffic coming from south and turning to the left at the intersection

TEST CASES FOR TESTING A TOSTER?
Does it handle all common types of breads.
Does it perform toasting well.
I’ll try to examine the performance by repeatedly using a tester and I’ll try to see if the performance degrades through repeated use.
I’ll try to test it with different kinds of bread, pizza slice, cracker type bread, flat bread, bread with high sugar content, very thin,medium,and thick
I’ll turn the taster on for a long time without putting any bread in it and see what happened. Here I’ll try to check if it has a certain controlling mechanism if the temperature is above a certain limit.
I’ll test it with for chemical reaction when it is in contact with a certain chemical.
I’ll test it with different power supplies.
I’ll test its reaction with the environment(like does it generate a certain gas which is harmful to the environment)
I’ll try to adjusting all the controls while operating and see every control produces the required result.
I’ll try to see if there is an electric shock when we touch the body of the toaster.
I’ll put more bread than it can accommodate and I’ll see what happens
I’ll try to flip it on side position and see whether it works well or not.
I’ll put a Frosted bread and see what is going to happen.
I’ll turn the toaster on until it gets very hot and then turn it off and put some bread to toast and see how it handles it.
I’ll try to discover which parts of the toaster to touch when in operation.
Should work with diffent voltage ranges(considering internationalization)


Given a screen with customer name, address, phone number, date of birth, SSN, and functions like ADD, DELETE, UPDATE, what types of tests would you execute (backend and GUI)?

GUI Testing:
· I’ll insert a proper data on each field and press add button.
· I’ll select a certain record and delete it.
· I’ll select a certain record and edit some fields with valid data and press update button.
· I’ll press the add button with out entering data in all fields.
· I’ll press the delete button with out selecting a particular record and see what happened.
· I’ll press the try to update without selecting a particular field.
· I’ll try to add an already existing record and see what happened.
· I’ll try to add a certain data in which certain fields are left.
· I’ll try to add data with long strings for each field.
· I’ll try to add data which is in different language and see what happened.
· I’ll try to add data which has a space or some special characters.
· I’ll try to add data which is inconsistent like negative ssn,birth date which is in the feauture, phone and address which is not valid,
· I’ll try to delete a certain record which doesn’t exist.
· I’ll try to update with out changing any value.
· I’ll try to update a record which doesn’t exist
· I’ll try to update a certain record with empty fields all.

DATABASE TESTING:
· I’ll check to see if a certain record has added to the database after I pressed add button.
· Check to see the performance by adding a record repeatedly in a fast manner.
· I’ll try to add so many records and I’ll see if disk space is a constraint
· I’ll try to delete a record which doesn’t exist and see how the Database reacts to this
· I’ll try to update a certain record with out making any changes.
· I’ll try to update a certain record with an invalid data.
· I’ll try to delete a record from an empty table int that particular database.
· I’ll try to see network failure while performing database operations.
· I’ll try to check how the database handles when I try to put duplicate records.
· I’ll try to execute the above GUI from so many client locations and see if there is a possibility of memory leakage.
Testing Enter File Name Text box of a dialog box
· I’ll try to save the specified file with out specifying a name
· I will try to put a certain specific length character and save it using a save button
· I’ll try to enter a file name consists of only numbers.
· I’ll try to enter a file name which will start with dot.
· I’ll try to enter a file name which is already existed.
· I’ll try to insert different combination of special characters and try to save it.
· I’ll try to enter a very long character equal to the maximum number of the characters that the text box accommodate and try to test it.
· I’ll enter a certain file name and click a cancel button.
· I’ll enter a file name which has a space in between words
· I’ll enter a file name which has only spaces.
· I’ll enter a directory name and try to save it and see what happened.
· I’ll enter a file name which exists but holds a different data format.

Test a clutch pencil
· I’ll try to sharpen a regular pencil
· I’ll try to sharpen diffent pencil which are made up of different materials for example hard, soft wood…etc
· I will try to put a pencil inside a hole with out pressing the clutch
· I will try to sharpen another material which has the same shape as a regular pencil
· I will try to sharpen a pencil by rotating the arm in opposite direction than the usual
· I’ll try to see the material composition is it hazardous if it is put in some chemical, is it going to burn.
· I’ll try to see the strength of the material by placing a high load.
· Does it need some safety precaution for children to use it.
· Is it continue to work if one of its components is failed like the arm,clutch or blade…etc
· Does the blade and other metal parts rest if it is stored in a frosted environment.

Test An Elivator?
· I’ll try to load an elevator with some rated load specified by the manufacturers
· I’ll try to load it with a heavy load which is much much greater than the rated load.
· I’l l see how it reacts when it’s not loaded.
· I’ll try to disconnect the main power supply while the elevator is working with a certain load and see what happened.
· I’ll try to call the elevator from a certain floor and by pressing both up and down arrow.
· I’ll try to open the door of the elevator manually and see what happened.
· I’ll try to disconnect the elevator and it’s controlling part and see what happened.
· From the inside of the elevator I’ll try to press a floor number button which is the same as where the elevator is
· From inside I will press and hold the open door button and see what happened.
· I’ll try to open the door manually from inside and see what happened.
· I’ll see when the final destination of the elevator is if it’s not called or loaded.

Behavioral Questions

Provided By: Barun Poudel.
Some important points which can make an interview successful:

Sleep – A good previous night’s sleep makes you feel fresh and it is reflected in your eyes. This is required because the client doesn’t want to deal with dull face.

Confidence – Confidence is automatically reflected in your looks, body language, and the way you walk, sit and talk. If you are confident you look confident, you walk confidently, you sit confidently and talk confidently. So be confident. One tip is, don’t feel too nervous about the last chapter you did not get to study for the interview.

Eating – Before going to the interview have a nice, good, stomach-full meal, because you may not know how much time you need to wait before the interview or how long it would take for the interview. If you are starving, you cannot answer well in the interview. So eat well, even if you are on a diet on the day of the interview.

What to wear for the interview – At the first look, what you are is what you wear. So wear a nice dress (type of formal dress – Black single breasted suit with buttoned down white cotton shirt, red tie, black shoes, black socks and black leather belt) and give that extra look for the interviewer. If you interview is in the evening and you need to drive in the morning, wear a different shirt while driving, and change to the well-ironed shirt before the interview (where do you change? – in the car or in the rest room)

What to carry for the interview –
In a neat folder put the following:
1) 3 copies of your resume – crisp, unfolded, unscrambled, un-scribbled.
2) A spiral notebook to take notes.
3) A pen
4) Photo-ID, preferably the driver license or State-ID
5) Mouth freshener
6) Directions for address
7) Address of the interview site
8) Name and phone number of the contact person

Busy Waiting – Wait in the lobby for the interview. Don’t be nervous be calm and cool. It is not uncommon that interview schedules are not met. There will be in ardent delays. Bear with them and wait (Busily!!!). Don’t worry. You will be escorted to the interview chamber, as soon as they are ready to see you.


Entering (the 3e Chamber of Shoaling) – Don’t worry. Interview chamber is not going to decide your future. It only sees, whether you have the technical and physiological qualities to deliver their job. That’s all! Therefore enter the chamber by gently pushing the door (if you are not escorted and you were asked to enter). Wish everybody a good day.


Shaking hands – If you are escorted, escorting person will tell you his name while shaking hand, and then you should say, “ How are you John?”
If you are entering the chamber by yourself say Good morning/afternoon to everybody and introduce yourself to him or her. “ I am Rajendra Sedhain”(your name)
Always your handshake should be warm, firm and friendly. A loose handshake indicates that you are not interested.

Wishing – Shake hands with all of the interviewers and try to remember their names and gently be seated.

Sitting – You can sit in a comfortable position, (but not with your legs crossed and/ or body leaning backward, which shows arrogance). Look forward, be enthusiastic, and bend forward, showing that you are interested in the interview.

Taking Notes – After the warming up and sitting, seek the interviewer’s permission to take down notes. Almost all the interviewers agree and let you. Then Open a clean page in your notebook, write down the date, heading (a typical heading would be interview with IBM at NYC) and the names of the interviewers.

If there is more than one interviewer, write their names in the order in which they have sat opposite to you. The first name you have written down in your notes shall correspond to the left most person sitting opposite to you and so on. You can use this information during interview to recollect their names. If the third person asked a question, look at the third name and start answering him using his first name (Example. John).


1) How are you?
Ans: I am Excellent. (Never use I am not too bad, I am all right, I am fine or I am good).

2) How did you arrive here?
Ans: I cam e by Train and bus or I came by Train and Taxi or I drove down.

3) Do you drive? Do you have a driver’s license?
Ans: Yes, John I drive and I have a IOWA state driver’s license (Never say I don’t drive or I don’t have a DL)

4) Your last project was in Nepal? What are you doing in IOWA(any other)?
I came to IOWA, USA for my master’s degree in Computer science and completed my on-campus study. Currently in CPT under F-1 status so looking for a full-time or contract job in .NET technology and attending interviews.

5) Tell me about yourself?
Ans: John, I have BS in computer science. I have 3 years of web development experience.
I have 2 years experience as .NET developer.
I am an expert in .NET, SQL server, XML, HTML, JavaScript, CSS.

6) Tell me something about your current project?
---------------------------------------------------------

7) What was your role in this project?
Ans: Enumerate the responsibilities from the resume

8) There are two managers, who want their tasks done in the next 6 hours. Each manager’s task takes 6 hours even if you are a superman. How will you handle this situation?
Ans: John, First I shall try and meet their demands as far as possible. Then talk to them and find out how 1 could meet their expectations. Ask for suggestions/advice.

9) Would you be willing to work extended hours as needed in order to complete the tasks?
Ans: Yes John, I am open to working extended hours. In fact, in my previous projects, I carried a mobile and a pager and was available 24/7.

10) What are your technical strengths?
Ans: John, I am a .NET developer. In my previous work places I always got commending letters and awards.

11) Are you open to new environments?
Ans: Yes John, I am open to work in new environments. I am eager to work in multiple environments. I always enjoy learning new technologies, and offer my best effort to complete the tasks given to me. In my last project I was a .NET developer, when I was required to work in the PHP I took this opportunity, I learnt quickly and did PHP developer job.

12) Would you like to work in a team or individually?
Ans: John, I am comfortable to work both as an individual and a team member. I have prior experience working both in a team as well as an individual. In IBM I worked as an individual (as a Java developer) and in AT&T I worked in a team, I excelled in both environments.

13) What is your status?
Ans: I am legally authorized to work in the USA. I am in CPT.

14) Quality Vs. Time; what is more important to you?
Ans: Both quality and time are equally important to me John. In all my previous projects, my target has always been delivering quality work in the given time.

15) Where do you see yourself in 5 years down the line?
Ans: 5 years down the line, I am looking forward to becoming a Project Manager John.

16) How soon can you join?
Ans: Immediately John (Within a week – couple of days for relocation).

17) Can you give some references?
Ans: Yes John, I have excellent references. I would love to give them to you but I need to inform my references each time I use their names because they asked me to do so. I shall get back to you in 24 hours.

18) If you were not able to complete a task within a deadline, how would you deal with the situation?
Ans: John, I would update my project manager immediately and explain the situation. I would work extra-time in the evenings and on weekends and complete the task up to my managers’ satisfaction.

19) What are you looking here?
Ans: I am a solution provider (developer). I am looking for challenging work environment.

20) Have you ever handled multiple jobs simultaneously?
Ans: Yes John, I was a developer as well as Analyst. John! In fact in my previous project I had to redesign the code at the same gather new requirements from the users.

21) Tell me about your greatest success professionally?
John, I was a entry level developer to start with and I became a mid level developer in 2 years. I was given the responsibility of .NET developer because of my commitment and integrity. I was chosen from among 5 people.

22) What are you best at?
Ans: I am best at adapting to new technologies very fast. In my previous project, they purchased a new TOOL and I was asked to work using that tool without training. I learned it in my spare time and came to normal speed within 1 or 2 weeks.

23) What is the most difficult situation you have faced while on any of your projects and how did you resolve it?
Ans: John, Just before releasing into production, we had discovered that there were duplicate keys. I wrote utility to scan and delete duplicate keys. This utility is still being used at IBM.

24) Is there any project which you liked the least?

Ans: I liked all my previous projects John. I really enjoyed working on each of them.

25) How do you handle conflicts?
Ans: I solve conflicts by keeping communication open.

26) What is your approach towards work?
Ans: I divide the work in sub tasks and keep monitoring the sub-tasks against their dead lines. In case of any sub task crossing the deadline, I reschedule the tasks, so the final task can be completed in time. In case of red flag, I inform to my manager well in advance.

27) Tell me about a project in which you were disappointed with your personal performance.
Ans: When I was with XYZ Company John, I initially designed .NET but they asked us to do the same thing using share point. Naturally I was not happy with the security issues.

28) Give an example of how you handle rejections.
Ans: John, I always take them in the right stride. I will take them as an opportunity to improve myself. Also I will make sure that I will not repeat the mistakes again.

29) What kind of skills and knowledge do you hope to acquire if you join us?
Ans: Well John, I possess all the required skills to perform the tasks assigned to me, yet I would like to learn rich values and working culture of your company.

30) Tell me something about your boss?
Ans: He was an honorable gentleman and I had a very cordial relationship with him.

31) What are your personal strengths?
Ans: I am always on time, I am a positive thinker and very enthusiastic. Every morning I get up early and plan my schedules and e-mails.

32) What are your personal weaknesses?
Ans: I am workaholic and I am a perfectionist.

33) Did you have a culture shock when you first came to the U.S?
Ans: No John, I am used to working in global companies even in my country, Nepal where I used to interact with people from various cultures. Education and working environments in my country are similar to that of UK and US.

34) What are your hobbies/free-time activities?
Ans: Reading books John. I play pool, I like going for long walks, swimming, and watching movies. I watch basketball, baseball and play golf sometimes. I love going out with friends and simply having fun. I go to nearby beaches and I enjoy fishing, and of course trekking.

35) Why are you leaving your current project?
Ans: I have successfully completed my last project John.


36) How good are your writing skills?
Ans: Very good, John, My project manager always used to ask me to write documents and in fact John! He provided me extra hours on weekends.

37) How do you motivate people?
Ans: By giving sincere appreciation John, by listening to them and also by rewarding them for their good work.

38) Tell me of an instance where your employer wasn’t happy with your performance?
Ans: John, all of my previous employers was satisfied with my performance on all my projects.

39) How do you resolve conflicts?
Ans: John, when I know I have a problem I will conduct a meeting and discuss the issues. By keeping communications open within the team, I try to evaluate the situation personally and in a group. I try to highlight our reasons and prioritize our tasks. In spite of all efforts if the conflict is not resolved, usually we arrange for a meeting with supervisor. And his/her decision is final.

40) Tell me if and how you think you can make a difference if you are hired?
Ans: I possess the functional background along with the desired skill sets John. So I can, understand the system along with the application in a better manner.


Questions to be asked to the interviewer after the interview:

1) Can you please tell me at what stage is the project in?
2) What is the environment in which the project is being developed?
3) What is the version of the Tool?
4) Do I need to travel?
5) When can I Join?
6) Would I be working with a team or individually?
7) What are the databases being used?

SQL questions:

1. What is normalization? Explain normalization types.
o Normalization is the process of organizing data in a database. This includes creating tables and establishing relationships between those tables according to rules designed both to protect the data and to make the database more flexible by eliminating two factors: redundancy and inconsistent dependency.
First Normal Form
• Eliminate repeating groups in individual tables.
• Create a separate table for each set of related data.
• Identify each set of related data with a primary key.
Second Normal Form
• Create separate tables for sets of values that apply to multiple records.
• Relate these tables with a foreign key.
Third Normal Form
• Eliminate fields that do not depend on the key.

2. What is demoralization and when would you go for it?
o Demoralization is the reverse process of normalization. It is the controlled introduction of redundancy into the database design. It helps to improve the query performance as the number of joins could be reduced.

3. What is a database index? What is the difference between a clustered and non-clustered index.
o Indexes in SQL Server are similar to the indexes in books. They help SQL Server to retrieve the data quicker. Indexes are of two types. Clustered indexes and non-clustered indexes. When you create a clustered index on a table, all the rows in the table are stored in the order of the clustered index key. So, there can be only one clustered index per table. Non-clustered indexes have their own storage separate from the table data storage.

4. What is the disadvantage of creating an index in every column of a database table?
o If we create an index on each column of a table, it improves the query performance, as the query optimizer can choose from all the existing indexes to come up with an efficient execution plan. At the same time, data modification operations (such as INSERT, UPDATE, DELETE) will become slow, as every time data changes in the table, all the indexes need to be updated. Another disadvantage is that, indexes need disk space, the more indexes you have, more disk space is used.

5. How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables?
o One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships.
One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships.
Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.(It requires at least three table.The third table serves to join two tables).

6. What's the difference between a primary key and a unique key?
o Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn't allow Nulls, but unique key allows one NULL only.

7. What is bit datatype and what's the information that can be stored inside a bit column?
o Bit datatype is used to store Boolean information like 1 or 0 (true or false). Until SQL Server 6.5 bit datatype could hold either a 1 or 0 and there was no support for NULL. But from SQL Server 7.0 onwards, bit datatype can represent a third state, which is NULL.

8. Define candidate key, alternate key, and composite key.
o A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys.
A key formed by combining at least two or more columns is called composite key.

9. What are defaults? Is there a column to which a default can't be bound?
o A default is a value that will be used by a column, if no value is supplied to that column while inserting data. IDENTITY columns and timestamp columns can't have defaults bound to them.

10. Explain different isolation levels
o An isolation level determines the degree of isolation of data between concurrent transactions. The default SQL Server isolation level is Read Committed. Here are the other isolation levels (in the ascending order of isolation): Read Uncommitted, Read Committed, Repeatable Read, and Serializable.

11. What's the difference between DELETE TABLE and TRUNCATE TABLE commands?
o DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it won't log the deletion of each row, instead it logs the deallocation of the data pages of the table, which makes it faster.

12. What are constraints? Explain different types of constraints.
o Constraints enable the RDBMS enforce the integrity of the database automatically, without needing you to create triggers, rule or defaults.
Types of constraints: NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY

13. What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?
o Cursors allow row-by-row processing of the result sets.
Types of cursors: Static, Dynamic, Forward-only, Keyset-driven.
o Disadvantages of cursors: Each time you fetch a row from the cursor, it results in a network roundtrip; where as a normal SELECT query makes only one roundtrip, however large the result set is. Cursors are also costly because they require more resources and temporary storage (results in more IO operations). Further, there are restrictions on the SELECT statements that can be used with some types of cursors.

14. What is a join and explain different types of joins.
o Joins are used in queries to explain how different tables are related. Joins also let you select data from a table depending upon data from another table.
Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are further classified as LEFT OUTER JOINS, RIGHT OUTER JOINS and FULL OUTER JOINS.

15. What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?
o Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table. From SQL Server 7.0 onwards, you could create multiple triggers per each action. But in 7.0 there's no way to control the order in which the triggers fire. In SQL Server 2000 you could specify which trigger fires first or fires last using sp_settriggerorder. Triggers can't be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined.

16. If two tables have a many-many relationship how will you resolve it.
o Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.

17. What is an advantage to using a stored procedure as opposed to passing an SQL query from an application?
o A stored procedure is pre-loaded in memory for faster execution. It allows the DBMS control of permissions for security purposes. It also eliminates the need to recompile components when minor changes occur to the database.

18.
What language is used by a relational model to describe the structure of a database?
o DDL,VDL,SDL