Skip to content

Tutorial: Create new test application

iks github user edited this page Jul 9, 2019 · 36 revisions

Back


Adding a new test application is not frequently done, but the prerequisite to run executable examples. SysNat provides a tool for the developer who is going to do this:

  1. In your IDE open java file TestApplicationGenerator and make sure that the constants of this class match your eypectations of the GoogleSearch test application.

  2. Execute the TestApplicationGenerator and assure that the following two files have been generated:

  • file ./sysnat.test.runtime.environment/src/main/resources/execution_properties/GoogleSearch.properties
  • file ./sysnat.test.runtime.environment/src/main/java/com/iksgmbh/sysnat/language_templates/googlesearch/LanguageTemplatesBasics_GoogleSearch.java.
  1. Make sure that the following two methods in LanguageTemplatesBasics_GoogleSearch.java are implemented like this:

          @Override
          public boolean isStartPageVisible() {
              try {
                  return executableExample.isTextCurrentlyDisplayed("Über Google");
               } catch (Exception e) {
                   return false;
               }
          }
    
          @Override
          public void gotoStartPage() {
              if ( ! isStartPageVisible() ) {
                  executableExample.getGuiController().reloadCurrentPage();
              }
          }
    
  2. Start SysNat with its SystemConfigDialog, make sure that test application GoogleSearch and target environment Production is selected and start test execution.

  3. Check the launched error report. It tells that no executable example has been found.


Back

Clone this wiki locally