https://cypress.io logo
New to Cypress - Need help in setting up Cypress f...
# i-need-help
p
#958013993425960971 I am new to Cypress and trying to automate API test cases. I am unable to find any documentation and videos with latest changes of Cypress to start with API set-up. I have installed all dependencies and cypress. Created API test cases under e2e folder since there is no Integration folder available. When i try executing it is always showing cypress welcome screen with E2E and component testing options and browser to select. Please help me with set-up and configurations anything needs to be added for API test automation. Thanks
w
Hi! There is no “API testing” mode of Cypress, API tests are written using the cy.request() command and most people write them as end-to-end tests. If you set up end to end testing you should be fine to start.
There is some recent content on this by @nutritious-restaurant-91514 https://filiphric.com/cypress-basics-api-testing Plus he has this great plugin to add some UI display for the results of your tests https://github.com/filiphric/cypress-plugin-api Hope this helps!
p
@wonderful-match-15836 Thank you so much. I have added the plug-in and created my first API test case. When I start the run using npx cypress open command cypress is opening and though i did the configuration as E2E and chrome browser still it is showing the same page every time when i start the runner. Is this expected behaviour? how can i make the default selection for this? Can you please help me.
w
you can do
npx cypress open --e2e --browser chrome
to skip the welcome page and the browser selection step