- Docker should be installed. You can install the latest version from here.
- Nodejs should be installed. You can install the LTS version from here.
- Allure should be installed for viewing the test results. You can install the latest version from here.
- You will need a IDE/text editor like VSCode/WebStorm or similar to view/edit the code.
- To test with npm: Update
src/config/local.env
with your github username and personal access token. - To test with docker: Update
Dockerfile
with your github username and personal access token. - You can generate personal access token from your github account -> https://github.com/settings/tokens.
- Open the project folder (github-public-api-tests).
- Run
source src/config/local.env
to set environment variables on your command line. - Run command
make npm
on your command line. It will run the tests and opens the allure test report in the browser.
- Open the project folder (github-public-api-tests).
- Run command
make docker
on your command line. It will run the tests on docker locally. Unfortunately, allure doesn't have official image yet for reports on docker.
- Open the project folder (github-public-api-tests).
- Run
npm install
on your command line to install all the dependencies. - Run
source src/config/local.env
to set environment variables on your command line. - To run the tests, run command
npm test
. You can check for the test results in the terminal. - To see the test report run command
allure serve
. This opens test report in your browser.
- All the commands are run from folder github-public-api-tests.
- If you want to use the username and personal access token of my test account it is already saved in local.env. But, the personal access token expires and you will have to request me for the new token(could be related to 2FA). Sorry for the inconvenience.
- Gitlab-CI integration is available here.
- For now, tests can be run on gitlab and then the test results in xml are stored as artifacts. But, we do not have the results in html yet.