- Added
--skip
flag to allow for skipping certain test suites.
-
Added
setState
argument toTestAgent
constructor, which allows for automatic data collection in tests by default. -
Removed obsoleted
flags
argument fromTestAgent
constructor. Feature flags are now accounted for in standard config.
- Versioned test runner now uses
--no-package-lock
when installing test deps.
-
Dropped support for Node 0.10 and Node 0.12.
-
Added
isLocalhost
andgetDelocalizedHostname
to utilities methods.These methods are useful for determining the host name as the New Relic agent sees it. When making metrics and event attributes, the delocalized hostname is what the agent will use.
- Fixed default messages for tap assertions.
-
Added check for
AGENT_PATH
environment variable.This environment variable can be used to specify the location of the
newrelic
package that these test utilities will load. It should be the path to the root directory of the agent. If the environment variable is not set, then thenewrelic
module that was installed (e.g. is in anode_modules
directory) is used instead. -
With this change, the following syntaxes are now valid:
versioned-tests
: Will look for tests with the following globs:test/versioned/**/package.json
tests/versioned/**/package.json
node_modules/**/tests/versioned/**/package.json
<-- For the agent to seamlessly work with the tests of deps!
versioned-tests test/versioned/hapi
: Will look with these globs:test/versioned/hapi/package.json
test/versioned/hapi/**/package.json
versioned-tests test/versioned/mongodb/package.json
: Will look only at:test/versioned/mongodb/package.json
- Added
agent#registerInstrumentation
method to registering third-party instrumentations in a testing environment.
- Fixed invalid
TestAgent.extendTap
reference inindex.js
toassert.extendTap
.
-
Added
TestAgent#registerInstrumentation
method.This method allows third-party instrumentations to be registered in a test environment.
-
Added
TestAgent
helper class.This class provides simple to use helpers for running your tests with the agent and in transactions.
-
Added
tap
assertions.If your tests use
tap
, then you can add some helpful assertions to your tests using this module. -
Added version matrix test running.
This is a script for executing your instrumentation's tests against many versions of the module you are instrumenting.