How do I create/delete item in my DB via API in Cypress?
up vote
-1
down vote
favorite
Can you please give some more examples how do I skip UI and fill in DB with API calls in Cypress?
I am rather new to Cypress, and can't find a solution myself.
Thank you in advance!
api automated-tests cypress
add a comment |
up vote
-1
down vote
favorite
Can you please give some more examples how do I skip UI and fill in DB with API calls in Cypress?
I am rather new to Cypress, and can't find a solution myself.
Thank you in advance!
api automated-tests cypress
We need more information. Do you want to make a request to a API?
– Maccurt
Nov 19 at 13:03
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
Can you please give some more examples how do I skip UI and fill in DB with API calls in Cypress?
I am rather new to Cypress, and can't find a solution myself.
Thank you in advance!
api automated-tests cypress
Can you please give some more examples how do I skip UI and fill in DB with API calls in Cypress?
I am rather new to Cypress, and can't find a solution myself.
Thank you in advance!
api automated-tests cypress
api automated-tests cypress
edited Nov 19 at 7:33
asked Nov 19 at 6:40
Lyu Ko
11
11
We need more information. Do you want to make a request to a API?
– Maccurt
Nov 19 at 13:03
add a comment |
We need more information. Do you want to make a request to a API?
– Maccurt
Nov 19 at 13:03
We need more information. Do you want to make a request to a API?
– Maccurt
Nov 19 at 13:03
We need more information. Do you want to make a request to a API?
– Maccurt
Nov 19 at 13:03
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
Cypress is only going to help you with
... anything that runs in a browser
You need to design this API layer for your test harness. Put simply, Back Door manipulation and Fixture Setup patterns is what your looking for. Combining both will improve the automation UI suites. Adding and reusing such API layer will make your suites fit enough to be part of the product’s daily life, not counting on heavy nightly regressions.
More details in my post on the topic.
add a comment |
up vote
0
down vote
Based on the limited amount of information you gave us I am taking a calculated guess on this. First you can easily call an API with .request(). With that you could have your API do whatever it wants to the DB. I am not sure what you mean by SKIP UI. You want to test that so you can't SKIP it, but you could mock the API returns to fill in the information you want.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Cypress is only going to help you with
... anything that runs in a browser
You need to design this API layer for your test harness. Put simply, Back Door manipulation and Fixture Setup patterns is what your looking for. Combining both will improve the automation UI suites. Adding and reusing such API layer will make your suites fit enough to be part of the product’s daily life, not counting on heavy nightly regressions.
More details in my post on the topic.
add a comment |
up vote
0
down vote
Cypress is only going to help you with
... anything that runs in a browser
You need to design this API layer for your test harness. Put simply, Back Door manipulation and Fixture Setup patterns is what your looking for. Combining both will improve the automation UI suites. Adding and reusing such API layer will make your suites fit enough to be part of the product’s daily life, not counting on heavy nightly regressions.
More details in my post on the topic.
add a comment |
up vote
0
down vote
up vote
0
down vote
Cypress is only going to help you with
... anything that runs in a browser
You need to design this API layer for your test harness. Put simply, Back Door manipulation and Fixture Setup patterns is what your looking for. Combining both will improve the automation UI suites. Adding and reusing such API layer will make your suites fit enough to be part of the product’s daily life, not counting on heavy nightly regressions.
More details in my post on the topic.
Cypress is only going to help you with
... anything that runs in a browser
You need to design this API layer for your test harness. Put simply, Back Door manipulation and Fixture Setup patterns is what your looking for. Combining both will improve the automation UI suites. Adding and reusing such API layer will make your suites fit enough to be part of the product’s daily life, not counting on heavy nightly regressions.
More details in my post on the topic.
answered Nov 19 at 11:53
ekostadinov
5,63621938
5,63621938
add a comment |
add a comment |
up vote
0
down vote
Based on the limited amount of information you gave us I am taking a calculated guess on this. First you can easily call an API with .request(). With that you could have your API do whatever it wants to the DB. I am not sure what you mean by SKIP UI. You want to test that so you can't SKIP it, but you could mock the API returns to fill in the information you want.
add a comment |
up vote
0
down vote
Based on the limited amount of information you gave us I am taking a calculated guess on this. First you can easily call an API with .request(). With that you could have your API do whatever it wants to the DB. I am not sure what you mean by SKIP UI. You want to test that so you can't SKIP it, but you could mock the API returns to fill in the information you want.
add a comment |
up vote
0
down vote
up vote
0
down vote
Based on the limited amount of information you gave us I am taking a calculated guess on this. First you can easily call an API with .request(). With that you could have your API do whatever it wants to the DB. I am not sure what you mean by SKIP UI. You want to test that so you can't SKIP it, but you could mock the API returns to fill in the information you want.
Based on the limited amount of information you gave us I am taking a calculated guess on this. First you can easily call an API with .request(). With that you could have your API do whatever it wants to the DB. I am not sure what you mean by SKIP UI. You want to test that so you can't SKIP it, but you could mock the API returns to fill in the information you want.
answered Nov 19 at 13:06
Maccurt
8461718
8461718
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53369515%2fhow-do-i-create-delete-item-in-my-db-via-api-in-cypress%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
We need more information. Do you want to make a request to a API?
– Maccurt
Nov 19 at 13:03