During discussions with customers who start using Rational Quality Manager, I sometimes get the following questions:
“I’ve associated MULTIPLE test scripts to my test cases. Now when I execute them, the LAST execution status returned when selecting a specific test script OVERRIDES previous execution status (with a different test script associated).
Seems like RQM is “loosing” previous execution status each time ! This is a bug, right ?“
Actually no, this behavior is NOT weird. You need to get the logic of the RQM tool wrt the semantic of the relationship between test cases and test scripts.
Let’s recap it here :
- A Test Case answers the question : “what am I going to test ?” It defines the things you need to validate to ensure the system is working correctly and is written to be environment-agnostic.
- As sketched in the model above, you could have AS MANY test scripts associated to a test case than desired…
BUT there are some best practices associated to this model. You can have multiple test scripts associated to a test case provided each test script tests the SAME functionality. This would typically be the case for:
- Running a test case in different test environments (thus implying non identical steps).
- When you have a manual test script and a robotic test script (e.g. RPT, RFT, Selenium, etc.)
Once this basis is stated, customer figure out they have followed a RQM anti-pattern which needs to be fixed.
While the solution to adopt is very dependent on the customer context, a possible remediation includes a refactoring work through the splitting of the test case content into several test cases, the merging of the multiple test scripts into a single test script (provided this doesn’t create an ugly monolithic test piece), etc.
Question: for running a test case in different test environments (not an anti-pattern), where shall the choice of the test script be done ?
- As an example, above snapshot presents the TCER section of the test case TC01.
- It includes 2 TCERs (which were generated for 2 different test environments: TC01_Chrome… and TC01_Firefox…). Test script Script for Chrome addresses TC01_Chrome… environment and Test script Script for Firefox addresses TC01_Firefox… environment.