2020 November Release

Recording Your First TestPermanent link for this heading

Before you can record your first test, the following prerequisites must be fulfilled:

  • Adapt the apptest-config file. Open the file and adapt the entries webserver (fully-qualified domain name), address (protocol and virtual directory), clienttype (web browser) and maybe other settings if necessary. If a remote client with installed agent should be used, you have to change the hostname attribute of the Agent tag, too. To avoid any authentication issues for your first try, you may use the Fabasoft Cloud (https://at.cloud.fabasoft.com/folio) as test system. Even if you have no account, you can interact with the log-in page.
    If there is no apptest-config file, you can create one. Open the “File” menu, point to “New” and click “Other”. Expand “Fabasoft app.test” and create a “Fabasoft app.test Config File”.
  • Create a test file (Open the “File” menu, point to “New” and click “Other”. Expand “Fabasoft app.test” and create a “Fabasoft app.test File” with “Test” as Initial value), if there is not already one.
  • Create a new “Fabasoft app.test” run configuration.
    • Define the test and configuration file.
    • The other settings are taken from the configuration file but can be overwritten if needed.

Note: It is recommended to use Google Chrome for recording tests because it provides the best performance.

To record your first test, proceed as follows:

  1. Edit the test file and enter the sample code below (either for Fabasoft Folio or Fabasoft Cloud).
  2. Add a breakpoint on the third line (double-click the left border of the source code editor).
  3. Launch the previously created run configuration.
    If everything works fine, a web browser will be opened and the Fabasoft Folio or Fabasoft Cloud user interface is shown. The test run stops at the breakpoint.
  4. In the ARIA tree you can record the actions the should be carried out. To do so, navigate to the desired node, open the context menu and click the wanted command (e.g. Click). The selected action will be inserted in the source code.
  5. To define where the statement should be inserted, move the cursor to the desired line and click the “Run to Line” command (Ctrl + R) in the debug symbol bar. The statement will be inserted before the instruction pointer.

By inserting some statements, you record your first test. When you are done you can stop the debug session.

Sample Code

// Fabasoft Folio example (basic authentication is assumed)
// replace <username> and <password> with the values of an existing user

test "Test" {
  
session Seq1("<username>", "<password>") {
    mystr = "string"
// add breakpoint here
  }

}

// Fabasoft Cloud example
test "Test" {
  
session Seq1() {
    mystr = "string"
// add breakpoint here
  }

}

For more information have a look at chapter “Fabasoft app.test DSL” and “How to Record Tests”.