In SystemWeaver's Test solution, a Test represents one execution of a System Under Test (SUT) according to a Test Specification. Tests are contained in a Test Suite. Using the Create Test view, users can create Test Suites containing Tests for one or more Test Specifications in a Test Scope with a common Test System and SUT in one step. The view also provides an option to create Tests for a sub set of Test Specifications or their Test Cases. It also allows you to create Tests in an existing Test Suite. In addition, the view supports the managing and selecting of test artifacts (SUT and Test System). This article describes the view and provides examples of how to create Tests.


Prerequisites

  • SystemWeaver Test meta model for Test Development and Test Execution 
  • Test Feature must be configured by an Architect for use of Create a variant of an original test specification option
  • One or more existing Test Specifications containing one or more Test Cases to be included in the Test to be executed


The Create Test view is active on the following item types, and used for the purposes described: 


Selected Item Type
SID
Description
Use the View to
Test SuiteJBTEA Test Suite represents one or many Tests. A Test Suite may include one or many sub Test Suites.Create a Test in the selected Test Suite. The new Test will be added to the existing Test Suite
TestJSESA Test represents a test of the System Under Test (SUT) as part of a Test System according to a Test Specification. The Test holds the result of the test as separate Test Status attribute values of each of the Test Cases included in the Test Specification.Create a Test from an existing Test, and include all, or a subset of, the original Test's Test Specifications and Test Cases. The new Test will be added to the same Test Suite as the original Test if created within the context of a Test Suite. If created outside the context of a Test Suite, a new Test Suite will be created for the new Test.
Test SpecificationJTSPA Test Specification is a set of test cases that are related, i.e., have something in common.Create a Test from all, or a subset of, Test Cases in a Test Specification. If created within the context of an existing Test Suite, the new Test is added to the existing Test Suite. If created outside the context of a Test Suite, a new Test Suite is created.
Test ScopeJTSDA Test Scope is a set of test cases that defines a “test project” organized as a set of test specifications.Create a Test Suite containing Tests from all, or a subset of, Test Specifications and Test Cases in a Test Scope. If created within the context of an existing Test Suite, the new Test is added to the existing Test Suite. If created outside the context of a Test Suite, a new Test Suite is created. 


To access the view, select an item in the structure of one of the above item types. Then, select the Create Test view via either the Items Ribbon or by selecting it in the View drop-down list. 




Getting Acquainted with the View

The view is divided into 4 sections: 

  • Test Specification
  • Test System
  • System Under Test (SUT)
  • Test



Test Specification

This section displays the Test Specification(s), and selects all of them be default. If Create a variant of an original test specification is selected, the specifications' Test Cases are viewable as well.



Name: The name of the Test Specification

Included in tests: The number of Test Cases in the Test Specification that are included in tests.


Options

The Create a variant of an original test specification option will display the Test Cases in the view, and enables you to select a subset of Test Cases in a specification rather than including all of them. When selected, it will create a variant of the original test specification (which you name using the Test specification name field provided). This means that instead of using the original Test Specification in the Test you are creating, new (variant) Test Specification item(s) are created. If the option to create a variant is not used, a Test Case removed from a Test, for example, will be removed from the original Test Specification as well which may or may not be what you intended. 


A right-click context menu provides useful options, e.g., for selecting and unselecting Test Cases, which is especially helpful when working with a list of thousands of Test Cases. See Searching for and Selecting Test Cases further down in this article for tips on how to use these options.



Test System

This section is for selecting the Test System, e.g., rig, etc., on which the test will be performed. The Test System may even include a product and variants from the feature model as shown in the below example.  


Name: The name of the Test System

Version: The item version number


Options

Open item... lets you select an existing Test System or create a new one, and Paste can be used if you copy a rig to the clipboard first. You can then paste it here.  Clear will clear the selected Test System.


The Structure tree indicator options can be used together with the Create a variant of the test specification option, and provide a means of visually comparing the Test being prepared and the Test System to confirm that you are testing the right features. 

  • Existence will highlight existing features in Test Cases that are in the Test System.


  • Match will highlight features in the Test Cases that match the selected feature in the Test System.


  • Configuration will highlight the Test Cases that include features that match those included in the Test System configuration, or those Test Cases that do not have a feature at all since they may be of interest.
    You can then unselect Test Cases that do not need to be included by clicking Select matching test cases. This tool is useful when working with variants, and you have a very large list of Test Cases. In this example, "Adaptive speed with moving obstacle" was deselected when clicking the button since the "Adaptive cruise control" feature is not in the selected Test System. The "Test jerk" Test Case is selected since it has no features.


System Under Test

This section is for selecting the test object (SUT) being tested. 


Name: The name of the SUT

Version: The item version number


Options

Open item... lets you select an existing SUT or create a new one, and Paste can be used if you copy a SUT to the clipboard first. You can then paste it here.  Clear will clear the selected SUT. 


 allows you to select a SUT when it is a part of the selected Test System to the left.



Locking/Unlocking Test System and System Under Test Selections

For both Test System and System Under Test, there is a lock option to lock your selections in place should you need to navigate in your test structure. If unlocked, your selections will be cleared.



Adding Additional Columns

As with most standard grids in SystemWeaver, additional columns, e.g., for attributes, can be included in any of the sections if needed. In the below example, the "CompuCategory" and "Inclusion" attributes have been added to the Test Specification section: 


Searching for and Selecting Test Cases

When working with very long lists of Test Cases in the view, the search options in the Find menu can be a real time-saver in your work to find and select and/or deselect Test Cases. 



For example, you can search for a particular attribute value to filter your Test Cases. In the below example, all Test Cases with an "Inclusion" attribute equal to 'Standard' will not be included in the Test. First, run a search for Inclusion=Standard.



Click OK and your hits will be highlighted in green in the list: 


Then, use the Select search result option to select all of your results.




Next, right-click in the view and select Uncheck selected.



This is just one example of how the Find and Select options can help you work more efficiently.


Creating a Test Suite Containing Tests

Below is one example of how to create a Test.

  1. Select an item of a type that the view activates on and load the view. In this example, a Test Scope is selected. The Test Specification(s) will display and will be selected by default. 
  2. Review the selected Test Specifications and, if desired, deselect any that should not be included in the Test using the checkboxes provided and/or the Find and Select options described above. 
  3. Select an artifact as Test System. In the below example, Open item... is used.
  4. Select an artifact as System Under Test. In this example a SUT is copied to the clipboard first from another open tab.


  5. Then, it is pasted to the Test via the view.
  6. In the bottom Test section, define a naming pattern and a Library for the Test to be created.
  7. Click the Create Test button. 
  8. In the New item dialog, enter a name for the new Test Suite that will contain the Test.


    The new Test Suite and Tests will be created and you will be redirected to them.


Creating Tests in an Existing Test Suite

Adding new Tests to an existing Test Suite works in the same way as described above except that when you create them, they will be added to the selected Test Suite. In the below example, a Test Suite called "All CC functions" is selected. A new Test for "Cruise control" will be created in the selected Test Suite, and it will be named "Test for Cruise control v2".



The resulting new Test will appear in the existing "All CC functions" Test Suite.



What's Next?

See an example of how creating a Test is performed on a product configuration where Test Cases are related to features in Feature Model and Variability.