Running Unit Tests

The Test Runner process is implemented in a separate window so you are able to continue developing while the tests are running — the test-runs status is updated automatically.

The Welkin Suite offers you many options in how to run tests depending on your purpose.

Run a concrete test class

There are two ways to run quickly any test class:

  • the context menu of the Apex Editor (or using the hotkey Ctrl+R, Ctrl+С) if a class is currently opened.

Run tests from the context menu of the Apex editor

Run tests from the Solution Explorer

NB: These approaches run only the version of the test class that is currently in the Salesforce org. So you need to build your changes first if you want them to be run.

In addition, a test method is running when you launch debugging a unit test.

Execute changes that were just built

If you have edited some tests, sent them to Salesforce, and now you want to run them, here are some handy options. The Welkin Suite helps you to build all the changes and to test them immediately. In order to do this, click in the Main Menu: Build ⇒ Build and Run Tests or use the hotkey Ctrl+F5.

Build and run tests

This action starts the build process, and when it has successfully finished, the test-run will start automatically. If the build fails, you will get a list of errors.

NB: This functionality applies only to those tests, that are built.

Usual tests running flow

In The Welkin Suite, you have the ability to run tests that you need to verify right now using the built-in Test Runner. This is available in different ways:

  • the Main Menu: Project ⇒ Run tests,

Run tests from the Project menu

  • the Main Menu: Test ⇒ Run Test,

Run tests from the Test menu

Run tests from the Tests Results panel

NB: Please note, if you changed a test and now you want to run it, you need to build it first. Until it isn't present on your org, it won't be available.

Cancel a running test job

You can cancel a running test job if it's unnecessary anymore. This option is available for the whole test-run, as well as for separate classes. A test job should be still in progress.

To cancel a test job right-click on it and select the Cancel option from its context menu.

Cancel a running test job

If you use the Cancel option for the whole test-run, the classes that are in progress will be aborted and will have the appropriate status, and the classes that have been finished will have the timely status from Salesforce. If you use the Cancel option for the running test class, you will see the results only for those test methods that have been finished, and other methods will be absent in the expanded class in the Test Results panel.

In this section:

This also may be useful:

Last modified: 2017/03/07 09:45

footer image