-
Notifications
You must be signed in to change notification settings - Fork 16
ReDBox Automated Tests
andrewbrazzatti edited this page May 23, 2024
·
4 revisions
ReDBox utilizes two main test types:
- Integration Tests: Written for Mocha, assess the services' integration.
- Postman API Tests: Conducted with Newman 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.
Postman Tests:
To run the postman tests
npm run test:postman
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'