Case Study: Migrate Cypress API Tests to Ruby

API Testing in Ruby is easier

Courtney Zhan

--

One day my father asked me to find a good Cypress API Test Script example and do a quick conversion to Ruby. (you will find out why in his upcoming article)

My first thought, “Cypress, isn’t it for web testing?” I did a Google search, indeed, there are plenty of articles on this topic. In fact, according to Cypress’ own LinkedIn post, Cypress API testing has a considerable audience.

There are seem some people “seriously” doing API Testing with Cypress, a web testing tool. I find it hard to comprehend.

To be fair (for comparision), I will use a Cypress API Test example (created by a credible source) in this Circle CI article: Testing an API with Cypress.

There are three files:

  1. Configuration (cypress.json):
{
"baseUrl": "https://aqueous-brook-60480.herokuapp.com",
"integrationFolder": "cypress/integration/api-tests"
}

2. Package setup (package.json)

"scripts": {
"test": "cypress open"
},

--

--

No responses yet