Test Case Vs Test Scenarios

Test Scenario is ‘What to be tested’ and Test Case is ‘How to be tested’.

Lets us first know the definitions of Test Case and Test Scenario

Test Case: In software engineering, a test case is a set of conditions or variables under which a tester will determine if a requirement upon an application is partially or fully satisfied. It is given as an input to test whether functionality is working fine or not.

Test Scenarios: Scenario testing is done to make sure that the end to end functioning of software is working fine or all the business process flows of the software are working fine. In scenario testing the testers put themselves in the end users shoes and figure out the real world scenarios or use cases which can be performed on the software by the end user. The testers take assistance from clients, stakeholders and developers to create test scenarios.

Difference between Test case and Test scenario:

  • Test case consist of a set of input values, execution precondition, expected results and executed post condition, developed to cover certain test condition. While Test scenario is nothing but a test procedure.
  • A Test Scenarios has one or many relations with Test Case, meaning a scenario can have multiple test cases. Each time we have to write test cases for test scenario. So before testing first prepare test scenarios then create two different test cases for each scenario.
  • Test cases are derived (or written) from test scenario. The scenarios are derived from used cases.
  • Test Scenario represents a series of actions that are associated together. While test Case represents a single (low level) action by the user.
  • Scenario is thread of operations where as Test cases are set of input and output given to the System.

Test Case Template

  • A test case can have the following elements. Note, however, that normally a test management tool is used by companies and the format is determined by the tool used.
  • Test Suite ID – The ID of the test suite to which this test case belongs.
  • Test Case ID – The ID of the test case.
  • Test Case Summary – The summary / objective of the test case.
  • Related Requirement – The ID of the requirement this test case relates/traces to.
  • Prerequisites – Any prerequisites or preconditions that must be fulfilled prior to executing the test.
  • Test Procedure – Step-by-step procedure to execute the test.
  • Test Data – The test data, or links to the test data, that are to be used while conducting the test.
  • Expected Result – The expected result of the test.
  • Actual Result – The actual result of the test; to be filled after executing the test.
  • Status – Pass or Fail. Other statuses can be ‘Not Executed’ if testing is not performed and ‘Blocked’ if testing is blocked.
  • Remarks – Any comments on the test case or test execution.
  • Created By – The name of the author of the test case.
  • Date of Creation – The date of creation of the test case.
  • Executed By – The name of the person who executed the test.
  • Date of Execution – The date of execution of the test.
  • Test Environment – The environment (Hardware/Software/Network) in which the test was executed.

Importance of Scenario Testing

As you know that exhaustive testing of any software application is not possible because of the following reasons:

  • Large number of data combinations.
  • Large number of possible paths in software.

It is because of this fact you always prioritize your testing efforts and focus on the most important areas, for that you use techniques like Boundary value analysis(BVA), Equivalence partitioning(EP), Risk based testing etc. however these techniques still do not guarantee bug free product.

By scenario testing you figure out the most important end-to-end transactions or the real use of the software applications which ensures that the software is working for the most common user scenarios. It helps in finding lot of defects which cannot be found with other types of testing.

Scenario testing is very important for complex transactions and for studying end-to-end functioning of the program.

Test cases are most important part of Software Development Life Cycle and without the one, it’s tough to track, understand, follow and reason out something. But in the era of Agile, test cases are being replaced fast with test scenarios.

Scenario testing is done by creating test scenarios which replicate the end users usage. A test scenario can be an independent test case or a series of test cases that follow each other. Test scenario is just a story which explains the usage of the software by any end user.