NodeJS test step

The NodeJS test step executes arbitrary Javascript code using the set NodeJS version. NodeJS versions 16 and 18 are supported. The maximum length of the script is 10240 characters.

The step fails if the script execution fails or if it ends with a non-zero exit code. The content of the standard output and standard error is recorded as the result of the test step and can be viewed using the Wenenu UI or accessed using the Wenenu API. The maximum combined length of the standard output and error is 524288 characters. The output is truncated if it exceeds the maximum length.

Note The variables of the test scenario are available as environment variables during the execution.
Note Filesystem operations are available. Every test step runs in separate docker containers. Test steps in the same test scenario have a common directory mounted into the container, sharing files between test steps is possible. The mounted directory is under /tests which is the current directory when the test execution starts.
Warning For security reasons, do not display any sensitive information in the step result.

UI settings

NodeJS step UI settings
Figure 1. NodeJS step UI settings

1

Arbitrary name of the test step up to 64 characters

2

Test agent that is going to execute the test step

3

Version of NodeJS that executes the code

4

Arbitrary Javascript code that gets executed

JSON

{
  "displayName": "NodeJS v12.14 test", 1
  "type": "nodejs", 2
  "id": "2f43fbcc-cd7b-4128-9eec-05930ba3d838", 3
  "version": "12.14.x", 4
  "code": "console.log('Version: ' + process.version + \"\\n\");\nconsole.log(\"Hello world\\n\");\nconsole.log(process.cwd());", 5
  "agent": { 6
    "type": "standard",
    "id": "162dff466f92c372005cf7055d006b77ac377e01c60ae59f942d74680f2496d1"
  }
}
1 Arbitrary name of the test step up to 64 characters
2 Type of the test step, must be 'nodejs'
3 Version 4 unique identifier of the test step, must be unique within the test scenario
4 Version of NodeJS that executes the code
5 Arbitrary Javascript code that gets executed
6 Agent object defining the agent that will execute the test step

Available modules, commands and libraries

NodeJS 12.18.3

Name Type Version

axios

package

0.20.0

bluebird

package

3.7.2

body-parser

package

1.19.0

classname

package

0.0.0

core-js

package

3.6.5

dotenv

package

8.2.0

eslint

package

7.10.0

fileloader

package

2.0.0

fs-extra

package

9.0.1

mkdirp

package

1.0.4

moment

package

2.29.0

node-fetch

package

2.6.1

npm

package

6.14.6

npmls

package

3.0.0

prop-types

package

15.7.2

ramda

package

0.27.1

request

package

2.88.2

rimraf

package

3.0.2

rxjs

package

6.6.3

shelljs

package

0.8.4

through2

package

4.0.2

uuid

package

8.3.0

winston

package

3.3.3

yargs

package

16.0.3

zone.js

package

0.11.1

NodeJS 10.22.0

Name Type Version

axios

package

0.20.0

bluebird

package

3.7.2

body-parser

package

1.19.0

classname

package

0.0.0

core-js

package

3.6.5

dotenv

package

8.2.0

eslint

package

7.10.0

fileloader

package

2.0.0

fs-extra

package

9.0.1

mkdirp

package

1.0.4

moment

package

2.29.0

node-fetch

package

2.6.1

npm

package

6.14.6

npmls

package

3.0.0

prop-types

package

15.7.2

ramda

package

0.27.1

request

package

2.88.2

rimraf

package

3.0.2

rxjs

package

6.6.3

shelljs

package

0.8.4

through2

package

4.0.2

uuid

package

8.3.0

winston

package

3.3.3

yargs

package

16.0.3

zone.js

package

0.11.1

NodeJS 8.17.0

Name Type Version

axios

package

0.20.0

bluebird

package

3.7.2

body-parser

package

1.19.0

classname

package

0.0.0

core-js

package

3.6.5

dotenv

package

8.2.0

eslint

package

7.10.0

fileloader

package

2.0.0

fs-extra

package

9.0.1

mkdirp

package

1.0.4

moment

package

2.29.0

node-fetch

package

2.6.1

npm

package

6.13.4

npmls

package

3.0.0

prop-types

package

15.7.2

ramda

package

0.27.1

request

package

2.88.2

rimraf

package

3.0.2

rxjs

package

6.6.3

shelljs

package

0.8.4

through2

package

4.0.2

uuid

package

8.3.0

winston

package

3.3.3

yargs

package

16.0.3

zone.js

package

0.11.1