Aqua 2023.3 Help

Run tests

Quick way

If your tests don't require any specific actions before start, and you don't want to configure additional options, such as code coverage, you can run them by using the following options:

  • Place the caret at the test class to run all tests in that class, or at the test method, and press Control+Shift+F10. Alternatively, click the App client expui run run gutter icon next to the test class or test method.

    The gutter icon changes depending on the state of your test:

    • The App client expui actions run all gutter icon marks new tests.

    • The App client expui gutter run success gutter icon marks successful tests.

    • The App client expui gutter run error gutter icon marks failed tests.

    Running a test using the gutter icon
  • To run all tests in a folder, select this folder in the Project tool window and press Control+Shift+F10 or select Run Tests in 'folder' from the context menu .

Customizable way

When you run a test, Aqua creates a temporary run configuration. You can save temporary run configurations, change their settings, share them with other members of your team. For more information, refer to Run/debug configurations.

  1. Create a new run configuration or save a temporary one.

  2. Use the configuration switcher on the main toolbar to select the configuration you want to run.

  3. Click App client expui run run or press Shift+F10.

    Running a run/debug configuration for tests

After Aqua finishes running your tests, it shows the results in the Run tool window on the Test Runner tab. For more information about analyzing test results, refer to Explore test results.

Test runner in the Run tool window

Run tests after commit

When you want to check that your changes wouldn't break the code before pushing them, you can do that by running tests as commit checks.

Set up test configuration

  1. Open the Commit tool window as described in the following topics:

  2. Click Show Commit Options the Settings button. In the menu, click Choose configuration near Run Tests and select which configuration you want to run. This can be a test configuration provided by your build tool, for example, gradle test or a single test class from the project.

    Pre-commit checks menu

After you have set up the test configuration, the specified tests will run every time you make a commit.

Stop tests

Use the following options on the Run toolbar of the Test Runner tab:

  • Click the Stop button or press Control+F2 to terminate the process immediately.

Stop running tests

Rerun tests

Rerun a single test

  • Right-click a test on the Test Runner tab of the Run tool window and select Run 'test name'.

Rerun a single test

Rerun all tests in a session

  • Click the Rerun button on the Run toolbar or press Control+F5 to rerun all tests in a session.

Rerun all session tests

Rerun failed tests

  • Click App client expui run restart failed tests on the Run toolbar to rerun only failed tests.

    Rerun failed tests

    Hold Shift and click App client expui run restart failed tests to choose whether you want to Run the tests again or Debug them.

    Restart/Debug failed tests

Rerun tests automatically

In Aqua, you can enable the autotest-like runner: any test in the current run configuration restarts automatically after you change the related source code.

  • Click Rerun Automatically Rerun Automatically on the Run toolbar to enable the autotest-like runner.

    Rerun Automatically option
Last modified: 20 October 2023