Presentation is loading. Please wait.

Presentation is loading. Please wait.

PART 2 LESSON XX Creating Test Cases

Similar presentations


Presentation on theme: "PART 2 LESSON XX Creating Test Cases"— Presentation transcript:

1 PART 2 LESSON XX Creating Test Cases
To protect the confidential and proprietary information included in this material, it may not be disclosed or provided to any third parties without the approval of QA TRAINING EXPERTS.

2 AGENDA What is the difference between Test Scenarios, Test Cases, and Test Scripts A Closer Look: a Test Scenarios A Closer Look: a Test Cases A Closer Look: a Test Script The 2 Parts of a Test Case More to come… Couldn’t change this slide because of the different background

3 What is the Difference Between?
What is a Test Case? What is the Difference Between? Test Scenarios Test Cases Test Scripts

4 How to Create Test Cases

5 What is a Test Case? a Test Scenario
is a high level description of what needs to be tested. a Test Case is a low level description of how something will be tested. a Test Script Is the instructions that tell us how to test.

6 A Closer Look a Test Scenario

7 What is a Test Scenario? A Closer Look Test Scenario a Test Scenario
describes a testing objective Is not specific – high level Is the parent of test cases may represent a set of test cases that may be independent or dependent on the output of the previous one.

8 Check Login Functionality
A Closer Look Test Scenarios Example: Test Scenario Test Scenario Test Cases Check Login Functionality Test Case 1: Check results on entering valid User Id & Password Test Case 2: Check results on entering invalid User ID & Password Test Case 3: Check response when User ID is Empty & Login Button is pressed, and many more

9 A Closer Look Test Scenarios Example: End to End Test Scenario

10 A Closer Look a Test Case

11 What is a Test Case? A Closer Look a Test Case a Test Case
is very specific. is a child of the test scenario is set of conditions under which a tester determines whether software satisfies requirements and functions properly. a contains step-by-step instructions to verify something behaves as it is expected.

12 A Closer Look a Test Case Who writes Test Cases? ?
TEST CASES are written by testers When are Test Cases not written by testers ?

13 A Closer Look a Test Case When are Test Cases written?
During Test Preparation (STLC) During the Build phase (SDLC) After identifying tests needed to verify each requirement

14 A Closer Look a Test Case Why are Test Cases needed?
To keep a record of what we tested To allow anyone to test To work through how to test something To help find problems in requirements or a design of an application.

15 A Closer Look a Test Script

16 What is a Test Script? A Closer Look a Test Script a Test Script
is part of a Test Case it contains step-by-step instructions that a tester follows to verify a test condition. each step has an expected result and an expected result that satisfies the test condition. a step is considered as PASSED if the actual result match the expected result and FAILED if actual result does not match.

17 The 2 Parts to a Test Case

18 Information about the Test
1ST PART Information about the Test

19 Information about a Test
2 Parts of a Test Case Information about a Test Test Objective Pre-Requisite Test Case ID Title or Name Author / Designer Creation Date Type of Test Application Module Prep Status / Review Status Name of Reviewer Requirement No

20 2ND PART Steps and Results

21 2 Parts of a Test Case Steps and Results Steps Results
Step Name – step 1, step 2, step 3 Step Description – action to be taken Results Expected Result – validation criteria Actual Result – description of the actual result

22 2 Parts of a Test Case Example of Test Script Step Name
Step Description Expected Result Actuial Result Step 1 Go to newtours.mercury.com Mercury Tours Homepage is displayed Step 2 Click on the Register link at the top of the page. Registration page opens successfully. Step 3 Enter in user information and click the “Submit” button. Registration successful

23 Characteristics of a Good Test Case

24 Characteristics of a Good Test Case
It should be simple, clear, and easy to understand. It should be accurate, satisfying a requirement. It should be economical, with no unnecessary steps or words, and have a good balance of information It should be traceable to a requirement It should be reusable. It should be repeatable, not requiring intervention to execute again. It should be compliant, following any standards in place. It should be independent, can be executed in any order without any dependency on other test cases.

25 How to Create Test Cases

26 How to Create Test Cases
A well-written test case should allow any tester to understand and execute the test. A test case should produce the same results every time no matter who tests it.

27 How to Create Test Cases
Standards

28 How to Create Test Cases
Test Case Standards Most mature testing practices have standards or rules you must follow when creating tests. These rules cover things like: Naming Conventions Required Info to capture for a test Test Case Templates Specifying Input Data Proper Step Naming Convention Maximum Number of Steps

29 How to Create Test Cases
Naming Conventions A framework you must follow when naming each test case. Enforce consistency across teams and team members. Helps keep tests organized and similar tests grouped. Help make identifying tests easier from its title Module

30 Elements of the Test Case
Test case ID: The ID of the test case Test case description: The objective or summary of the test case Pre-requisites: Preconditions before starting the test Dependencies: Mention dependencies w/ other test cases or data Pre-conditions: Prerequisite before execution of this test case. Post-condition: State of the system after executing test case? Test steps: Procedure to execute the test Test data: Data required while executing the test Expected Result: The expected output of the test Actual Result: The actual output of the test Status: Pass, Fail, ‘Not executed’ when test case is not executed and ‘Blocked’ when high severity bug is found Created By: Name of the person who wrote the test case Date of creation: The date on which the test case was authored

31 How to Create Test Cases
STEP 1 – Fill out the required fields STEP 2 – ASDFASDF STEP 3 – ASDF

32 Fill out the required fields
How to Create Test Cases STEP 1 Fill out the required fields TRACKING INFO MAIN INFO

33 How to Create Test Cases
STEP 1 - Fill out the required fields Tracking Information Project Author Created On Type Module Req No.

34 How to Create Test Cases
STEP 1 - Fill out the required fields Main Info Title / Name Test Objective Pre-requisites

35 How to Create Test Cases
Title / Name Aims of a name Why is it important to choose good names for Test Cases? Name the test in a way that it describes what is being tested and/or the objective. the name will contain either the action or the aim of the Test Case Examples “Open New Project Dialog” “Select any entry from a context menu on any tree node” “Fill in mandatory fields in new customer dialog”

36 How to Create Test Cases
Test Objective Copied from RTM Should be very descriptive. Describe the goal of the test case and what is being validated.

37 How to Create Test Cases
Pre-Requisites Anything that must be satisfied before the test can be executed. Access Data Browser Example To test to ensure you can sell a share of stock the pre-requisite is user must have shares prior to executing the test A maternity leave must be initiated prior to executing this test.

38 How to Create Test Cases
STEP 2 – CREATING THE TEST SCRIPT Step Name Step Description Expected Result

39 How to Create Test Cases
STEP 2 – CREATING THE TEST SCRIPT The Step Name Generic numbering Step 1 Step 2 Descriptive names Login Process Enter Search Criteria

40 STEP 2 - Creating the Test Script
How to Create Test Cases STEP 2 - Creating the Test Script Step Name Step Description Expected Result

41 Click on the “Sign-on” button. Select “Texas” in the drop down list
List all the test execution steps in detail. Write test steps in the order in which they should be executed. Make sure to provide as many details as you can. Tip – In order to manage a test case efficiently with a lesser number of fields use this field to describe the test conditions, test data and user roles for running the test. The test case should generate the same results every time no matter who tests it How to Create Test Cases STEP 2 - Creating the Test Script The Step Description Action the tester must perform Examples Click on the “Sign-on” button. Enter 123 for password Select “Texas” in the drop down list

42 Click on the “Sign-on” button. Select “Texas” in the drop down list
How to Create Test Cases The Step Description Action the tester must perform Examples Click on the “Sign-on” button. Enter 123 for password Select “Texas” in the drop down list List all the test execution steps in detail. Write test steps in the order in which they should be executed. Make sure to provide as many details as you can. Tip – In order to manage a test case efficiently with a lesser number of fields use this field to describe the test conditions, test data and user roles for running the test. The test case should generate the same results every time no matter who tests it

43 How to Create Test Cases
The Step Description Write them SIMPLE – Simple instructions in the steps. The directions should be transparent and easy to understand. Use the assertive language. (e.g. enter password, click on this etc.). Focus on ONE GOAL – Test only one functionality at a time. – If you try to test multiple conditions in one test case, it becomes very difficult to track the results and the errors. Be PRECISE – Do not assume any functionality and features of your software. Stick to the Specification Documents. Always follow the same RULES – Organize your test cases consistently. Using the same pattern in organizing your test cases makes the testing easier for you as well as your colleagues or successors Make them SHORT – If the test case contains a long list of steps and an error occurs, the developer would have to backtrack and repeat all the test steps. Having too many test steps can be a disadvantage for the tester, too. The tester would have to repeat each step to ensure that the bug was fixed.

44 How to Create Test Cases
Create Test Case with End User in Mind - Ultimate goal of any software project is to create test cases that meets customer requirements and is easy to use and operate. A tester must create test cases keeping in mind the end user perspective Avoid test case repetition - Do not repeat test cases. If a test case is needed for executing some other test case, call the test case by its test case id in the pre-condition column Do not Assume - Do not assume functionality and features of your software application while preparing test case. Stick to the Specification Documents.

45 How to Create Test Cases
Test Cases must be identifiable. - Name the test case id such that they are identified easily while tracking defects or identifying a software requirement at a later stage. Self cleaning – The test case you create must return the Test Environment to the pre-test state and should not render the test environment unusable. This is especially true for configuration testing. Repeatable and self-standing - The test case should generate the same results every time no matter who tests it. The test case you create must return the Test Environment to the pre-test state and should not render the test environment unusable. This is especially true for configuration testing. Make it Reusable A good test case is reusable and provides long-term value to the software testing team. When writing a test case, keep this in mind. You can save time down the road by re-using the test case instead of re-writing it. Write independent test cases -- Your test cases should not have dependency on other test cases, i.e you should be able to execute your test case individually with having dependency on other test cases.

46 The yahoo home page should be visible The sales order number is shown
How to Create Test Cases Expected Result What to look for to evaluate if the step passed or failed what should occur after performing the Step Description. Example The yahoo home page should be visible The sales order number is shown

47 How to Create Test Cases
Test Case Status Pending - Under Development – This means the test case is in the process of being developed. Ready for Review – This means the test case is ready for its peer review. Needs Repair – This means that there is feedback that must be addressed as a result of a peer review. Ready for Test – The test case is ready for execution.

48 How to Create Test Cases
Change Management When making a change to a test has already approved You may need to capture some info about the change For audit purposes. Examples Date of change Name of person making the change Why the change is being made What the change is

49 How to Create Test Cases
Variations copy of an existing test case only difference is the input data To validate some functionality testing it several times with different data is required.

50 How to Create Test Cases
Peer Review Checklist Did they follow the agreed upon standards if any exist? Naming conventions Does it have a good balance of info? required info captured? test objective clear? verify the objective? expected results is explicit? easy to follow? Pre-requisite filled out properly ? Input data specified correctly?

51 Tips on Creating Tests

52 How to Create Test Cases
Steps and Expected Results Make sure your steps and expected results are DETAILED! Never use words like… or The tester must be able to follow and understand what to do and how to check the results of the test.

53

54 For the Interview A Test Scenario is a high level description of a testing objective. It is not specific and typically represents a set of test cases. A Test Case is set of conditions under which a tester determines whether software satisfies requirements and functions properly. A Test Script is step by step instructions to verify a test condition.


Download ppt "PART 2 LESSON XX Creating Test Cases"

Similar presentations


Ads by Google