Question

In: Computer Science

Problem Description: What is a test case? What are the characteristics of a good test case?...

Problem Description: What is a test case? What are the characteristics of a good test case? What is a driver? What is a stub? With what type of test is each most closely associated?

Solutions

Expert Solution

Test Case:

A test case is a document, which has a set of test data, preconditions, expected results and postconditions, developed for a particular test scenario in order to verify compliance against a specific requirement.

Test Case acts as the starting point for the test execution, and after applying a set of input values, the application has a definitive outcome and leaves the system at some end point or also known as execution postcondition.

Example:

Let us say that we need to check an input field that can accept maximum of 10 characters.

While developing the test cases for the above scenario, the test cases are documented the following way. In the below example, the first case is a pass scenario while the second case is a FAIL.

Scenario

Test Step

Expected Result

Actual Outcome

Verify that the input field that can accept maximum of 10 characters

Login to application and key in 10 characters

Application should be able to accept all 10 characters.

Application accepts all 10 characters.

Verify that the input field that can accept maximum of 11 characters

Login to application and key in 11 characters

Application should NOT accept all 11 characters.

Application accepts all 10 characters.

If the expected result doesn't match with the actual result, then we log a defect. The defect goes through the defect life cycle and the testers address the same after fix.

Characteristics of good test case:

Accurate

  • Tests what the description says it will test

Economical

  • Separate the initiation steps
  • Has only the steps needed for its purpose

Repeatable, self-standing

  • Same results no matter who tests it
  • Don't rely on tester experience when using scripted test

Appropriate

  • No Pesticide Paradox presents
  • For both immediate and future testers

Traceable

  • Forward to logs
  • Backward to a requirement

Self-cleaning

  • Returns the test environment to a start state

Stub:

Stubs are used to create user Interface .Underlying functionality may be simulated by stubs. Do not perform any real computations or manipulate any real data. Stubs work downwards, integrating lower and lower levels. Stubs are also used when the software needs to interact with an external system.

Drawback: Cost of writing the stubs.

You may need to simulate ‘returns’ or ‘responses’

This can be problematic.

But it is a good technique too.                     

Drivers:

We needs drivers to test the lower layers of software. Drivers are simple programs designed specifically for testing that make calls to the lower layers and/or provide parameters. Drivers in bottom-up testing have a similar role to stubs in top-down testing, and are time-consuming to write. Drivers may need to provide various parameters, temporary files, and may have to be coded to recognize the proper value / type of data returned.

With what type of test is each closely associated:

Stubs are used used during Top-down integration testing, in order to simulate the behaviour of the lower-level modules that are not yet integrated.

Drivers are used during Bottom-up integration testing in order to simulate the behaviour of the upper level modules that are not yet integrated.


Related Solutions

What is a test case? What are the characteristics of a good test case? What is...
What is a test case? What are the characteristics of a good test case? What is a driver? What is a stub? With what type of test is each most closely associated?
// TESTING //------------------------------------------------------------------------------ // TEST CASE 1 // // DESCRIPTION // Performs an acceptance test of...
// TESTING //------------------------------------------------------------------------------ // TEST CASE 1 // // DESCRIPTION // Performs an acceptance test of the entire program. // // INPUT DATA (Note that the input data is read from a file named payroll.txt) // Simpson Homer // 15.25 84 // 2 // // EXPECTED OUTPUT // ----------------------------- // EMPLOYEE: Simpson, Homer // // PAY RATE: $ 15.25 // HOURS: 84.00 // GROSS PAY: $ 1311.50 // MED INS DEDUCT: $ 110.13 // 401K DEDUCT: $ 78.69 // FED...
After the description has been written, the litmus test to a good description is that closes....
After the description has been written, the litmus test to a good description is that closes. True False A plat is required if at least one tract of the subdivision is five acres or less. True False
What are the characteristics of a good strategic planner?
What are the characteristics of a good strategic planner?
What are some important characteristics of a good mentor?
What are some important characteristics of a good mentor?
1. Which of the following quotes is a good description of the moral hazard problem? Milton...
1. Which of the following quotes is a good description of the moral hazard problem? Milton Friedman: “Nobody spends somebody else’s money as carefully as he spends his own. Nobody uses somebody else’s resources as carefully as he uses his own.” Di Lorenzo: “Whenever government allocates resources … the more affluent in the society will always receive a disproportionate share of the benefits.” Von Mises: “Motorcars, television sets and refrigerators do not make a man happy. As soon as some...
Problem Description Objective This practical will test your knowledge on sorting and searching algorithms. In this...
Problem Description Objective This practical will test your knowledge on sorting and searching algorithms. In this practical, you will be implementing a number of algorithms. Each of these algorithms will be constructed in a different class. You should make sure that you know the complexity of the algorithms you implement. Design Think of how you are going to solve the problem and test your implementation with the test cases you designed based on the stages below. Testing Hint: it’s easier...
What are the components of a good job description? What are job requirements and how would...
What are the components of a good job description? What are job requirements and how would you describe them? How do you analyze a job description?
What is the relocation problem? What is a spinlock? What are its characteristics?
What is the relocation problem?What is a spinlock? What are its characteristics?What is a semaphore? What is a mutex?
D1. What does an economist mean by the term “public good”? What are the characteristics of...
D1. What does an economist mean by the term “public good”? What are the characteristics of a public good? Give two examples of health-related goods or services that might be characterized as “public goods” Public goods and services are not cost-free. How do you think people should be made to pay for them? D2. One purpose of the government is to redistribute money from those who are well off to those who are needy. As far as health care is...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT