New Test Case Wizard

Opens the New Test Case wizard New Test Case wizard helps to create a new slotted exemplar which extends one of test case parents. Created exemplar can contain package declaration, comments, pragma statements and test method stubs basing on methods in a class which is being tested.

Test Case Page

Test Case page allows you to specify general options for new test case. All configurations used here are described in table below:

Option Description Default
Container Enter a source folder for the new test case. Either type a valid path for the source folder or click Browse to select a source folder. This location must be relative to your workspace. The folder of the element that was selected when the wizard has been started.
Name Type a test case exemplar name. <blank>
Package Enter the package name for the new test case exemplar. The package name that has been typed in the previous execution of this wizard or a blank field.
Class under test Select exemplar or mixin to be tested. The exemplar will be used in the next page to determine the test method stubs to be created. To change this field click Browse button and select an exemplar from local resources or session. To remove the selected exemplar use Clear button. No class under test. Test case exemplar will be generated without test method stubs.
Parent Select parent exemplar used for handling test cases. Default parent exemplar specified in MUnit preference page.
Do you want to add comments and pragmas?
  • Generate pragmas:
    Select this option if you want to generate default pragmas for test case exemplar and its elements.
  • Generate comments:
    Select this option if you want to generate comments where applicable.
Previous selection is being remembered by default.
What method stubs would you like to create?

Choose the method stubs to be created in this class:

  • set_up() method:
    Adds a set_up() method stub to the new test case exemplar. This method will be called before every test method.
  • tear_down() method:
    Adds a tear_down() method stub for this test case exemplar. This method will be called after every test method
By default these buttons are unchecked.
Change the default new source file attributes:
  • Name: Change name of the file.
  • Encoding: Select file encoding.
By default the name is recomputed using test case exemplar name. Encoding selection is remembered from the previous wizard.

New Test Case Page

Test Methods Page

Test Methods page allows you to select methods from the tested class and its parents. Selected methods will be used to create test method stubs for the new test case exemplar. For each selected method the corresponding test method (named test_<name>) will be created.

Option Description Default
Add failure for each test method If selected, it adds _self.fail("Not yet implemented") instruction to each test method. This instruction is used to fail the not yet implemented test. It should be replaced by an appropriate test code. Previous selection is remembered by dafult.

New Test Case Select Methods Page


Note: If you did not specify the tested class in the previous page this page will be skipped. By default, all parents except sw:object are displayed in the page. To view the parents one or more GIS session should be started.

Configure LoadList Page

Configure LoadList page is used in most of the source code creation wizards. Full description of this page can be found under load list configuration topic.

Related concepts

Test Case

Related reference

MUnit test launcher