A test case answers this question: What are you going to examine? You develop test cases to specify the situations you must confirm to ensure the software is working properly. And test suite is a collection of test cases grouped together for logical purposes. Test suites are designed to test an application and demonstrate it has some specified group of behaviors. A test suite usually contains step-by-step directions or goals for each selection of test cases and information on the system setup for use throughout testing. A group of test cases can also include required states or measures and descriptions.
Test suites are sometimes wrongly referred to as a test plan, a test script, and sometimes a test scenario. Each of these is a distinct document that is related to one another.
What is a Test Case?
A test case could leverage the same script for analyzing multiple settings. For example, if you’d like to test an authentication script on three distinct browsers: Chrome, Firefox, and Edge. You could create three separate iterations within that test case. In a test case named Test Web Browsers, you may include three testing situations:
- Iteration 1: login script with Chrome
- Iteration 2: login script with Firefox
- Iteration 3: login script with Edge
What does a test case include?
A test case includes test datasets, test steps, and test results. Testing the application’s functionality will use the test dataset. Test steps are the processes for completing a test and are typically written in either plain text or using a tools script language such as Gherkin. Consequently, a test case must also include some verification of expected and actual results. The result of that comparison is what will tell you whether the test has passed or not.
Pre-Condition and Post-Condition
Pre-condition is a condition that should be true to test a case. For example, in an online shopping app, users must have one or more items in their carts to test the checkout feature.
Post-Condition is a condition that should be true after testing a case. For instance, if you test the checkout feature for an online shopping app. The post-condition could verify that items were successfully removed from the user’s cart and added to their order history page.
What is a Test Suite?
If each test case reflects a component of a scenario. Like the functionality simulating the completion of a sale, make use of a test suite. For example, a test suite may comprise five test cases, each having a separate test script:
- Test case 1: Login
- Test case 2: Add New Services to Cart
- Test case 3: Complete Order of Services
- Test case 4: Log-out
- Test case 5: Fulfill Service Request
Test suites (less commonly known as validation suites) can include manual tests and automated tests. But automated tests are most beneficial when you can run them without supervision. When running a suite, you can specify whether to run the test cases in the suite in sequential mode or in parallel mode. Test suites could identify gaps inside a testing cycle where a single test case’s successful conclusion must occur before starting another test case.
For example, you can’t add new services to a cart until you log into the application. When you execute a test suite in a sequential mode, you may decide to block the suite execution in case one test case doesn’t pass. Preventing further execution is of good use if executing a test case in a test suite depends on the success of previous test cases.
Test suites are created based on the scope of the test plan or where one is in the testing process. Often, test suites contain detailed instructions or goals and information on the system configuration used during testing. They could contain any kind of test, functional or Non-Functional. Functional testing focuses on verifying application functionality. Non-functional testing includes a variety of checks such as usability, compatibility, scalability, performance, etc.
Types of Test Suites
Test suites are often divided into two categories with unique functions. These also discuss the use of test suites in the software testing lifecycle.
- Abstract Test Suite: This type of test suite is a component of model-based testing that defines test cases at a higher level of abstraction. Abstract test suites provide enough detail to allow test selection but do not specify test data or the exact steps for test execution.
- Executable Test Suite: The Abstract test suite forms the basis of this test suite. It provides the basic, low-level details to run a test suite application. Executable test suites include test data, specific test steps, and other test information. This type of Test suite operates at a granular level and interacts with the application under test in such a way as to ensure that it is operating correctly.
Test suites can also be helpful for these kinds of tests:
- Smoke tests: A selection of test cases that ensure the application’s basic functionality is working. On average, smoke tests are the initial testing conducted after changes are made to the application under test. Several smoke tests into a small suite of tests are combined in a smoke test suite. So when the application is ready to deliver to staging or pre-production environments, developers can know in minutes whether the latest version is ready for further testing.
- Regression tests: Utilizing a group of test cases to ensure breaking code changes have not occurred.
- End-to-end tests: A collection of test scripts that cross a product’s bounds and verify and exercise the integration between systems.
- Functional tests: A group of test cases dedicated to particular requirements. Implementing this type of test using a test suite means several areas of a specific feature are all tested.
- Build verification tests: A group of test cases that validate the software’s functional areas. Execution of scenarios must be after every product build and until the promotion of the build for a larger customer base.
In AccelaTest, you can create custom Test Suites and nest test suites by clicking the “Create Directory” button and giving your directory a name, such as “Regression Tests.” Don’t have your free AccelaTest account yet? Sign up now – did we mention Test Case Management is completely free for teams?
What is a Test Plan?
A Test Plan is a dynamic, comprehensive record defining the test strategy, objectives, schedule, estimation, deliverables, and resources necessary to complete testing for a software product. Test Plans help determine the time required to confirm the quality of the software under test. The test plan acts as a blueprint to perform testing tasks in a specified process, the test manager will monitor and track these activities.
According to the ISTQB definition: “Test Plan is a document describing the scope, approach, resources, and schedule of intended test activities.”
What is a Test Script?
Although you can execute a test without an associated test script, it is best to associate each test case with a test script.
You may write manual test scripts to be run by an individual tester. Or you can automate a few of the directions in the test script. You can link automated functional test scripts, load test scripts, and even security test scripts to a test case.
By understanding test suite execution and what test cases and test plans are all about, you can better plan for successful test cycles.
Can Test Cases have multiple Test Scripts?
In many cases, you might need to use test suites to combine related test cases. For example, you may run a set of automated regression test cases together or sequentially run a set of test cases that comprise an end-to-end scenario. With a test suite, you can organize, start, and then track the execution of associated test cases that compose the bigger scenario tested by the test suite. You might even associate multiple test scripts with a test case.
However, you certainly should only associate multiple scripts when each test script gives another way to test the scenario in the test case. For instance, a test case may require multiple scripts to test the scenario in several different test environments. Alternatively, you could run the test case through manual scripts and automated scripts.
Don’t use test cases to group test scripts that perform frequent functions; doing so may cause erroneous data regarding test results and attempted scenarios. As an example, should you execute a test case for a particular test plan, iteration, or test environment and define a unique functional script every time, the previous result of this test execution simply captures the results of the previous script execution.
You might also need to use test suites to group related test cases in certain cases. For example, you may use a suite to execute a few automated regression test cases or run multiple automated E2E scenarios. With a test suite, it is possible to organize, start, and track the progress of a test case execution.
Test Case Management, Automation, and More – Start Testing with AccelaTest
Don’t have a test management tool yet? We all accept testing is vital to successfully deploying software. Both manual test cases and automated test cases are imperative to deploying software. Why not document your manual test bed automatically using AccelaTest’s free tools? Or, you can explore the best test management tools currently available.