testable-utils
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -63,2 +63,7 @@ var _ = require('lodash'); | ||
}); | ||
browser.addCommand('testableScreenshot', function(name) { | ||
const id = info.region.name + '-' + info.chunk.id + '-' + info.client + '-' + info.iteration; | ||
const dir = (process.env.OUTPUT_DIR || '.') + '/'; | ||
browser.saveScreenshot(dir + id + '-' + name + '.png'); | ||
}); | ||
} | ||
@@ -65,0 +70,0 @@ } |
{ | ||
"name": "testable-utils", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Utilities for Testable scripts", | ||
@@ -5,0 +5,0 @@ "author": "Avi Stramer", |
@@ -195,2 +195,8 @@ # Testable Script Utilities | ||
### Screenshots | ||
One command that has no `testable-utils` equivalent is `browser.testableScreenshot(name)`. This command takes a screenshot and puts it in the output directory to be collected as part of the test results. It also includes a prefix to make it easier to identify: `[region]-[chunk]-[user]-[iteration]-[name].png`. Tests are broken up into chunks, and within each chunk users and iterations are numbered starting at 0. So for example `us-east-1-123-0-0-MyHomePage.png` would be chunk id 123, first user, first iteration, image name `MyHomePage`. | ||
### Command Mappings | ||
<table> | ||
@@ -263,2 +269,6 @@ <tr> | ||
<tr> | ||
<td><pre>browser.testableLogTrace(msg);</pre></td> | ||
<td><a href="#logging"><pre>log.trace(msg);</pre></a></td> | ||
</tr> | ||
<tr> | ||
<td><pre>browser.testableLogDebug(msg);</pre></td> | ||
@@ -265,0 +275,0 @@ <td><a href="#logging"><pre>log.debug(msg);</pre></a></td> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25075
443
300
9