This is the 4th Tutorial in our HP Quality Center Training series. You can check all the previously published tutorials on this page. Note – As the tutorial length is little long we have divided our initial 4 days training into 6 tutorials. This will help you to learn HP Quality Center step by step with every minute detail.
In this tutorial you will learn:
- How to create test cases in Quality Center
- How to link test cases to requirements
- Creating test suites in Quality Center
What You Will Learn:
Creating Test Cases in HP ALM/Quality Center
We are working our way through ALM and have discussed Release, Cycle and Requirements. In our previous session we created a releases, added cycles to them, created requirements, mapped them back to cycles and releases and finally, we saw how the statistics are affected based on these mappings. In our article today, we will move on to the further steps.
We will keep referring to the same Gmail.com example that we did in the previous articles. If you are not familiar with the same, please refer to the below article that came out before this one.
If the following are the test conditions that you came up with for each of our features in the May release:
1) Login – with correct credentials
- a) Launch Gmail, Enter correct user name, enter correct password and click login
- b) Launch Gmail, Enter correct user name, enter correct password, select “Stay signed in” and click login
2) Login – incorrect credentials
- a) Launch Gmail, Enter correct username, incorrect password and click Login
- b) Launch Gmail, Enter incorrect username, correct password and click Login
- c) Launch Gmail, enter incorrect username, incorrect password and click Login.
How do you write a manual test case for the same? Either you would use a word doc or an Excel sheet. I used an excel sheet to write the 1(a) test case as an example:
Let us see how to create the same test case in ALM.
Test Plan Tab in ALM
Steps to create test cases under Test Plan tab:
Step #1: Login to ALM into the right project. Create the release, cycles and requirements as described in the previous tutorials.
Step #2: Go to the Test Plan tab by choosing “Testing->Test Plan” from the side bar.
Step #3: Choose “Subject” as your home folder and create a sub folder “ALM training” under it. I am going to create “May Release” and “June Release” Sub folders under it.
Step #4: Go to May Release folder and choose the option to create a new test.
Step #5: Enter name and then choose the “type”. Choose “manual” for our tutorial.
Step #6: Enter the other details. The designer name will be auto populated based on your login credentials. Click OK. The test gets added.
Step #7: Now you can add your steps. Click on the “Design Steps” tab. Click on “New Step” icon.
Step #8: Enter the step details. The description and Expected Results fields come up complete text editing features that are self explanatory.
Step #9: I am going to create all the steps as shows above. This is how the completed test case looks like:
This completes the process of adding test cases and steps to them.
Step #10: Under May release I am going to add some more test cases.
Linking Test Cases to Requirements:
Steps to link test cases and requirements:
1) Select a test case created and click on it. All the properties get displayed in the right hand side tab. Go to “Req coverage” tab and click on “Select Req”
2) The requirements tree gets displayed on the side. Expand the tree and select the needed requirements.
3) Once done, close the requirement tree. You can link a test case to as many requirements as you would like. This is how the added requirement looks.
4) Let us now check, how this mapping effects the requirement. Go to Requirements tab from the side bar. Double click on the requirement that you just mapped and notice the “Test Coverage” details:
You see how the test details and it’s the test’s status is displayed. Since this test was just created and never run, the coverage status shows as “No Run”. Let us now move on in our tutorial and learn how to run a test.
“Test Lab” tab in ALM:
Imagine we have just begun the May release testing phase. The first cycle is Smoke test. We are not going to execute all the test cases we have.
- Briefly, a smoke test is a high level test performed by the QA team on an AUT as soon as the code is deployed to make sure the application did not break. So we are only going to execute test cases 1-a and 2-c.
- Similarly for sanity testing, which is checking the key functionality of the AUT. We will execute 1-a, 1-b and 2-e
- Functional testing is everything.
Test lab tab will help us create test sets that contain the test cases that we need to execute in each phase. This is where the tester can execute the tests and record the test results. Let’s see how.
Steps to create test suites in Quality Center:
Step #1: Go to Test lab tab by navigating from the side bar. Create the folders as shown below:
Step #2: Under May release, choose the option to create a new test set
Step #3: Enter the test set name. Click OK.
Step #4: Once it is created. Click on “Select Tests” from the menu
Step #5: Select the tests as required
Step #6: Alternately if you choose the “Requirements Tree” tab, you can choose requirement and all the tests that are linked to it get added to your test set.
Step #7: Go ahead and create all the test sets. As you can see from the above screen shot I have created a test set each for each cycle.
Step #8: Tip: You can choose to add the same test multiple times in a test case. In that case, the second instance of the test will appear with a prefix .
Points to Note:
1) If you observe, we have created our releases, requirements, tests etc all under the parent folder “ALM training”. There is no rule that you should do that. You can choose a different name for your folder in each section. But as you have seen, it makes so much sense to use the same folder name. For a real time project that you are working on and trying to use ALM for, try to come up with a name that you would want to consistently use across as the first step for your test management process.
2) The columns in the test plan tab or any other tabs can be customized by your project’s ALM admin.
This finishes how we create tests, add steps to the tests, link the tests to requirements, create test sets, adding tests to test sets, and finally back tracking our way to see how each activity effects the statistics each time.
In our next Quality Center tutorial we will learn how to execute test cases and check execution status using this tool.
Please let us know how we are doing. We value your opinion and will take all feedback very seriously.