Dataprovider Service is built on Javascript and based on faker.js to provide dummy data in JSON and CSV format for test automation through the REST API.
Server was developed with Express.js and Consign.
Unit Tests uses mochajs and chaijs.
This project uses the design patterns from Airbnb JavaScript Style Guide.
Title : Get data in JSON format.
URL : /dataprovider?format=json&property=name.firstName,name.lastName&quantity=1
Method : GET
Response Codes: Success (200 OK)
Response:
[
{
"firstName": "Yago",
"lastName": "Barros"
}
]
Title : Get data in CSV format.
URL : /dataprovider?format=csv&property=name.firstName,name.lastName&quantity=1
Method : GET
Response Codes: Success (200 OK)
Response:
"firstName","lastName"
"Bruna","Macedo"
-
Install Node
-
Install Dependencies
$ npm install
-
Start Service
$ npm start
-
Run Unit Tests
$ npm test
-
Run Test Coverage
$ npm run coverage
-
Run Lint
$ npm run lint
Check the methods available in faker.js