Skip to content

Tutorial: Create new test application

iks github user edited this page Jun 14, 2019 · 36 revisions

Back


  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. Open file ./sysnat.natural.language.executable.examples/settings.config.

  3. Line 4 contains the comma separated list of available test applications. Add GoogleSearch to this list.

  4. Start the SysNat with its SystemConfigDialog, select test application GoogleSearch and target environment Production, finally start test execution.

  5. Check the launched error report. It tells that no executable example has been found. That is what we are going to do in the next part of the tutorial...


Back

Clone this wiki locally