Example using tshield as api mock for a web application component test using Ruby, Cucumber and Capybara
This example use Node.js, Ruby and ChromeDriver
Run the following command to prepare your environment:
npm i
To run with tshield mock server run the following command
npm run start-mock
To run without mock run the following command
npm run start
To run application without mocks you need to provide valid API keys to start application by this env vars:
- MARVEL_API_PRIVATE_KEY
- MARVEL_API_PUBLIC_KEY
- TENOR_API_KEY
To get started, install the bundler:
gem install bundler
Then you should be able to run the following command to prepare your environment:
bundle install
Now run tshield to start mock server
tshield
npm run start-mock
tshield
cucumber