-
Notifications
You must be signed in to change notification settings - Fork 16
ReDBox Automated Tests
Mark Cottman-Fields edited this page Sep 19, 2024
·
4 revisions
ReDBox utilizes two main test types:
- Integration Tests: Written for Mocha, assess the services' integration.
- REST API Tests: Automated tests to evaluate API functionalities.
Before running tests, the packages need to be installed and typescript compiled.
Mocha Tests:
To run the mocha tests
npm run test:mocha
Note: for the DOI tests to pass you will need to have Datacite Fabrica credentials and these need to be set to the following environment variables:
-
datacite_username
: Your datacite username -
datacite_password
: Your datacite password -
datacite_doiPrefix
: The DOI prefix
If these aren't set, the DOI tests will be skipped.
REST API Tests:
To run the tests
npm run test:bruno
Note: if you receive the error below, it's because you have previously run the application for development. To fix, simply delete the support/development/.dev directory and try again.
EACCES: permission denied, scandir '/opt/redbox-portal/support/development/.dev/mongo/data/db/diagnostic.data'