The results of the challenge for QA Position.
- Open the Careers webpage
https://www.fullfabric.com/company/careers
- Close the cookie policy if shown
- Navigate until the New Jobs section
- Check if there's any QA Job listed
- API token from the Careers webpage
- Do a request
GET
to teamtailor api to list all jobshttps://api.teamtailor.com/v1/jobs
- Check if the response is 200
- Validate that there's any job for QA position
- The job status should be
open
- API Token from the Careers webpage
- Get the job id and title from the api
- Do a request
PATCH
to teamtailor api to change the job title
- requestURL:
https://api.teamtailor.com/v1/jobs/{JOB_ID}
- method:
PATCH
- data:
{
"data": {
"id": "{JOB_ID}",
"attributes": {
"title": "{NEW_JOB_TITLE}"
},
"type": "jobs"
}
}
- Check that the response code is
403
- Check the job title was not changed.
You have to install all dependencies first.
npm install
To setup the environment to run the API scenarios have to run the setup first:
npm run test:api:setup
This setup will navigate using selenium webdriver and mochajs to navigate until the Careers page and get the api token exposed there.
Will save a .env
file on ./api
directory following the structure below:
TOKEN={TOKEN_API}
BASE_URL={TEAM_TAILOR_API}
To run the Cypress + Cucumber E2E test, you have to execute the following command:
npm run test:cypress
This command will run the E2E test on browser Chrome
in headless
mode (without open the browser view)
Will generate a report of the execution on terminal like below:
(Run Finished)
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✔ careers.feature 00:05 1 1 - - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✔ All specs passed! 00:05 1 1 - - -
And will generate a HTML report on directory ./cypress/e2e/reports/cucumber-htmlreport.html/index.html
Where is possible to see all steps executed on Gherkin structure like below:
There are other ways to run the tests like other browser or without headless mode activated.
to run on chrome
browser in headed
mode:
npm run test:cypress:headed
To run on edge
browser in headless
mode:
npm run test:cypress:edge
to run on chrome
browser in headed
mode:
npm run test:cypress:headed:edge
All the results will follow the same logic, generating terminal results and the HTML file to better viewer.
P.s.: just remembering the step 2
on Configuration
section:
To setup the environment to run the API scenarios have to run the setup first:
npm run test:api:setup
To run the API tests, you have to execute the following command:
npm run test:api
This command will run the API Test using the Mocha JS
and Axios
to do the requests in Javascript.
Verify Job by Teamtailor API
✔ Get all jobs listed on API (817ms)
Check the QA job is listed and opened
✔ Verify if the response status is 200
✔ Check if there's any QA job listed and open
It's not possible change the job title using the website token
✔ Getting the QA job id
✔ Send a request to change the job title (138ms)
✔ Response status should be 403
✔ Check the job keep with the same title (251ms)
7 passing (1s)
After that will generate a report file in HTML format to better viewer.
This report will be created on api/mochawesome-report
and the view is like below:
I'm so glad to participate on this challenge and any doubts or concern please, let me know.
Best regards,
DANILO CASASSA :)