Export of test cases

  • Test cases may be exported to text files via export online and export of generated testcases.
  • Export online button is located in method’s property page.
  • Export online button is unavailable (grayed) when testing function has no parameters.
  • After click on Export online button an Export online dialog is displayed.
  • The dialog has fields similar to Execute online dialog with the addition of two fields: Export target file and Advanced.. button.
  • Export target file is the field where user can type path (with filename) to the file where export result will be written.
  • User can click Browse… button and select the export file.
  • As export file an existing file or a new file can be selected.
  • After clicking on Advanced… button an Export template definition dialog is displayed before loading.
  • An editable template text is located under label Template for data export.
  • The template consists of three sections: [Header], [TestCase] [Footer].
  • Section [TestCase] is obligatory, while sections [Header] and [Footer] can be removed.
  • In all sections a plain text can be used or it can be mixed with expressions described below.
  • The following expressions can be used in the Header section.
    • %package – defines the name of the package where method is located.
    • %class – the name of the test class containing test method.
    • %method – the name of the method.
    • $N.name – the name of the Nth parameter of the method(counting from 1).
  • In the TestCase section all expressions from Header section can be used and also:
    • $N.choice – short name of the choice that will be used in the test case as Nth parameter.
    • $N.full_choice – qualified name of the choice used in the test case as Nth parameter.
    • $N.value – value of the Nth parameter of this test case.
    • %suite – test suite name of the test case.
    • %index – a number under which this test case was exported (starting from 0).
    • $(expression) – define simple arithmetical expressions. Parentheses can be also used.
  • In the section Footer the same expressions as in Header section can be used.
  • Current template text can be saved in a file via Save As… button.
  • Previously saved template can be loaded from text file via Load… button. If current template has been modified a confirmation dialog is displayed.
  • Target file file text box and Browse.. button are located under template definition text field.
  • Target file can by typed or selected via file selection dialog available after clicking Browse… button.
  • Target file selection dialog allows to choose the following file extensions: csv, txt. Any file can be selected after changing file selection filter to ..
  • Test cases are exported to the target file. Old contents of the file will be overwritten with confirmation.