ReqRes is a bare-bones ExpressJS application. 
 
Docs & Demos ⇒ https://reqres.in/
 

Installation

  • Make sure Node.js is installed on your machine,  
  • Open the “cmd”, Go to the path you have unziped the package.
  • npm install,wait for the installation complete.
  • Make sure you have Gulp installed globally (only needed for asset compilation)
  • node app.js`  , as show below capture:  
【Rest Assured】ReqRes 实例测试环境搭建
【Rest Assured】ReqRes 实例测试环境搭建
 

Tour

  • [app.js]- this is where we create the Express app and define all of our routes
  • [index.js]- this is the main file for the callback routes
  • [config.json] - this houses the pagination details & fake session token
  • [data.json]- this holds the fake data. This is where you would add a new key to the array and then you could define a callback route for it in `routes/index.js`
 

相关文章: