I don't see my tests in Scope after installing the Scope Node.js Agent
If you don't see any results in Scope after following the Scope Node.js Agent installation, check the following:
Have you configured a valid
The Scope Node.js Agent needs a valid
SCOPE_DSN configured as environment variable.
Keep in mind that
SCOPE_DSN is different per namespace so if you configure a
SCOPE_DSN from other namespace, you will not see results in Scope for that repository.
You can find further information in Scope Node.js Agent - Environment variables section.
Have you forwarded the required environment variables?
If you are executing your tests in a container, you need to forward some environment variables depending on your CI provider, so the agent can autodetect the build information.
You can find further information in Scope Node.js Agent - Running tests inside a container section.
Have you checked the compatibility of Scope Node.js Agent with your project?
If you are using certain libraries or version libraries that are not officially supported by the Scope Node.js agent, you might have not see data in Scope after executing the test phase.
You can find further information in Scope Node.js Agent - Compatibility section.
I can't see the Test Code in the Test Code Tab
This is most likely caused by a problem with
SCOPE_SOURCE_ROOT. While we try to autodetect the root of your repository, it is not always possible. For example, if your folder structure looks like this:
|-- source |-- root |-- src |-- service-1 | |-- package.json | |-- tests | |-- integration.spec.js |-- service-2 |-- package.json |-- tests |-- smoke.spec.js
This is incorrect and will lead to the Test Code not working properly.
How to fix it
SCOPE_SOURCE_ROOT env var to the root of your repository when you run your test commands, e.g.:
SCOPE_SOURCE_ROOT=/source/root yarn test-service-1
SCOPE_SOURCE_ROOT=/source/root yarn test-service-2