@ -141,69 +141,129 @@ To run the Selenium tests via Nightwatch:
for Firefox: `npm run nightwatch_local_firefox`, or
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_usingWorker
The package.json file contains a list of all the tests you can run.
- npm run nightwatch_local_libraryDeployment
**NOTE:**
- npm run nightwatch_local_solidityImport
- **The `ballot` tests suite** requires to run `ganache-cli` locally.
- npm run nightwatch_local_recorder
- **The `remixd` tests suite** requires to run `remixd` locally.
- npm run nightwatch_local_transactionExecution
- **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_staticAnalysis
### Using 'select_test' for locally running specific tests
- npm run nightwatch_local_signingMessage
There is a script to allow selecting the browser and a specific test to run:
- npm run nightwatch_local_specialFunctions
```
npm run select_test
```
- npm run nightwatch_local_solidityUnitTests
You need to have
- npm run nightwatch_local_remixd # remixd needs to be run
- selenium running
- npm run nightwatch_local_terminal
- the IDE running
- npm run nightwatch_local_gist
- optionally have remixd or ganache running
- npm run nightwatch_local_workspace
### Splitting tests with groups
- npm run nightwatch_local_defaultLayout
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_pluginManager
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_publishContract
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_generalSettings
There is no need to number the groups in a certain order. The number of the group is arbitrary.
- npm run nightwatch_local_fileExplorer
A test can have multiple group tags, this means that this test will run in different groups.
- npm run nightwatch_local_debugger
You should write your tests so they can be executed in groups and not depend on other groups.
- npm run nightwatch_local_editor
To do this you need to:
- npm run nightwatch_local_compiler
- 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.
- npm run nightwatch_local_txListener
```
'Should generate test file #group1': function (browser: NightwatchBrowser) {
console.log('\x1b[33m%s\x1b[0m','[WARN] Any application that runs on your computer can potentially read from and write to all files in the directory.')
console.log('\x1b[33m%s\x1b[0m','[WARN] Symbolic links are not forwarded to Remix IDE\n')