@ -141,69 +141,129 @@ To run the Selenium tests via Nightwatch:
for Firefox: `npm run nightwatch_local_firefox`, or
for Firefox: `npm run nightwatch_local_firefox`, or
for Google Chrome: `npm run nightwatch_local_chrome`
for Google Chrome: `npm run nightwatch_local_chrome`
- Run a specific test case instead, use one of following commands:
- Run a specific test case instead, use a command like this:
- npm run nightwatch_local_ballot
- npm run nightwatch_local_ballot
- npm run nightwatch_local_usingWorker
- npm run nightwatch_local_libraryDeployment
- npm run nightwatch_local_solidityImport
- npm run nightwatch_local_recorder
- npm run nightwatch_local_transactionExecution
The package.json file contains a list of all the tests you can run.
- npm run nightwatch_local_staticAnalysis
**NOTE:**
- npm run nightwatch_local_signingMessage
- **The `ballot` tests suite** requires to run `ganache-cli` locally.
- npm run nightwatch_local_specialFunctions
- **The `remixd` tests suite** requires to run `remixd` locally.
- **The `gist` tests suite** requires specifying a github access token in **.env file**.
```
gist_token = <token> // token should have permission to create a gist
```
- npm run nightwatch_local_solidityUnitTests
### Using 'select_test' for locally running specific tests
- npm run nightwatch_local_remixd # remixd needs to be run
There is a script to allow selecting the browser and a specific test to run:
- npm run nightwatch_local_terminal
```
npm run select_test
```
- npm run nightwatch_local_gist
You need to have
- npm run nightwatch_local_workspace
- selenium running
- npm run nightwatch_local_defaultLayout
- the IDE running
- npm run nightwatch_local_pluginManager
- optionally have remixd or ganache running
- npm run nightwatch_local_publishContract
### Splitting tests with groups
- npm run nightwatch_local_generalSettings
Groups can be used to group tests in a test file together. The advantage is you can avoid running long test files when you want to focus on a specific set of tests within a test file.x
- npm run nightwatch_local_fileExplorer
These groups only apply to the test file, not across all test files. So for example group1 in the ballot is not related to group1 in another test file.
- npm run nightwatch_local_debugger
Running a group only runs the tests marked as belonging to the group + all the tests in the test file that do not have a group tag. This way you can have tests that run for all groups, for example to peform common actions.
- npm run nightwatch_local_editor
There is no need to number the groups in a certain order. The number of the group is arbitrary.
- npm run nightwatch_local_compiler
A test can have multiple group tags, this means that this test will run in different groups.
- npm run nightwatch_local_txListener
You should write your tests so they can be executed in groups and not depend on other groups.
- npm run nightwatch_local_fileManager
To do this you need to:
- npm run nightwatch_local_runAndDeploy
- Add a group to tag to a test, they are formatted as #group followed by a number: so it becomes #group1, #group220, #group4. Any number will do. You don't have to do it in specific order.
**NOTE:**
- **The `ballot` tests suite** requires to run `ganache-cli` locally.
```
'Should generate test file #group1': function (browser: NightwatchBrowser) {