- In the Project tree, select the parent folder of the src (production) and the test folders, and choose New | File on the context menu.
- In the New File dialog box, that opens, type a name of the configuration file with the extension jstd or conf.
-
Open the new file in the editor and specify the full path to the current folder and paths to the files to load relative to
the current folder. Use wildcards to specify file name patterns.
The required format is YAML
, for more details,
see description of test runner configuration files
.
You can also have a configuration file generated automatically
If you are going to use a test server running on another machine or listening to another port, start it according to the server-specific instructions and specify its URL address in the Server ares of the Run/Debug Configuration: JSTestDriver dialog box.
- Make sure the JSTestDriver plugin is enabled.
- On the main menu, choose .
-
In the JSTestDriver Server tool window, that opens, click the Run a local server toolbar button
.
To stop the server when you are through with unit testing, click the Stop the local server toolbar button
.
- With the JSTestDriver Server running, open the JSTestDriver Server tool window.
- Copy the contents of the Capture a browser using the URL read-only field.
- Open a browser of you choice and paste the copied URL address. The Remote Console of the JSTestDriver opens.
- Switch to the JSTestDriver Server tool window and click the icon that indicates the browser you just opened. IntelliJ IDEA displays a message informing you that it is ready for executing tests.
-
Open the Run/Debug Configuration dialog box by doing one of the following:
- On the main menu, choose .
- Press RunConfigurationRunConfiguration and choose Edit Configuration on the context menu.
-
Click the Add button
on the toolbar and select the JSTestDriver configuration type.
- In the dialog box that opens, specify the test scope, configuration parameters, and activities to perform before test execution.
- Apply the changes and close the dialog box.
