From 035eb749e4499a63f27d2c5ebf0c7a04252618a2 Mon Sep 17 00:00:00 2001 From: praveenatest <64353555+praveenatest@users.noreply.github.com> Date: Fri, 27 May 2022 11:33:38 +0530 Subject: [PATCH] feat : added two new pages , added missing canonical tag , broken links fixed --- .../automate-web-applications.md | 2 +- .../json-schema-validation.md | 70 ++++++++++++ ...build-tests-using-local-android-devices.md | 2 +- .../mobile-apps/build-tests-using-recorder.md | 2 +- .../cross-platform-end-to-end-testing.md | 108 ++++++++++++++++++ 5 files changed, 181 insertions(+), 3 deletions(-) create mode 100644 src/pages/tutorials/rest-api-testing/json-schema-validation.md create mode 100644 src/pages/tutorials/test-plans/cross-platform-end-to-end-testing.md diff --git a/src/pages/tutorials/getting-started/automate-web-applications.md b/src/pages/tutorials/getting-started/automate-web-applications.md index ae241a6..b10c7f4 100644 --- a/src/pages/tutorials/getting-started/automate-web-applications.md +++ b/src/pages/tutorials/getting-started/automate-web-applications.md @@ -6,7 +6,7 @@ order: 1.1 page_id: "Get Started with Automating Web Applications" search_keyword: "Get started, Automate Web Applications, Testsigma Tutorials" warning: false -canonical: "page url" +canonical: "https://testsigma.com/tutorials/getting-started/automate-web-applications" page_title: "Get Started with Automating Web Applications" social_share_summary: "Twitter summary message" social_share_desc: "Sharing page description" diff --git a/src/pages/tutorials/rest-api-testing/json-schema-validation.md b/src/pages/tutorials/rest-api-testing/json-schema-validation.md new file mode 100644 index 0000000..888d1e1 --- /dev/null +++ b/src/pages/tutorials/rest-api-testing/json-schema-validation.md @@ -0,0 +1,70 @@ +--- +title: "Contract Testing with Testsigma" +metadesc: "This document describes the step-by-step details on how to execute contract testing with Testsigma, a no-code test automation tool." +noindex: false +order: 3.2 +page_id: "How to do Contract Testing with Testsigma" +search_keyword: "" +warning: false +contextual_links: +- type: section +- name: "Contents" +- type: link + name: "Pre-requisite:" + url: "#pre-requisite" +- type: link + name: "Steps" + url: "#steps" +--- + +--- + +Contract testing is done to ensure that two endpoints (eg. two microservices) are compatible and are able to communicate with each other. This is different from integration testing as here both the endpoints can be tested in isolation. Contract testing is done by issuing a contract to both endpoints and ensuring that they honor it. + + +In this document, we will discuss how Testsigma does it. + +--- +> ## [Pre-requisite:](#pre-requisite) +> In order to automate a test case for contract testing, you will need: +> * A REST API that is supposed to communicate with another endpoint +> * A JSON Schema to validate the response from the REST API in point + +--- + +To add the test case in Testsigma, you should know: + +1. [How to add a test case in Testsigma.](https://testsigma.com/docs/test-cases/manage/add-edit-delete/) + +2. [How to add a REST API test step to a test case in Testsigma](https://testsigma.com/docs/test-cases/step-types/rest-api/) + +3. [How to automate REST APIs with Testsigma](https://testsigma.com/tutorials/getting-started/automate-rest-apis/) + +4. [How to execute tests on Testsigma](https://testsigma.com/docs/runs/adhoc-runs/) + + +--- + +## [Steps](#steps) + +* Create a test case in Testsigma. + +* In the test case created in step 1, add a REST API test step. + +* In the REST API test step > Request Details, add the REST API endpoint that you want to test. For the purpose of this document, we will test a GET API, as also shown in the screenshot below: + +![Request Details while adding a Get API to execute contract testing via Testsigma](https://docs.testsigma.com/images/tutorials/rest-api-testing/json-schema-validation/get-api-request-details-contract-testing-testsigma.png) + +* Under the Test step added in step 2, go to the “Verify Response” tab and add the “Expected Status Code” for the REST API’s response. For our example, we have added the Expected Status Code as 200, which is a code for “completed”, meaning the test was a success. + +![expected status code under verify response tab to execute contract testing via Testsigma](https://docs.testsigma.com/images/tutorials/rest-api-testing/json-schema-validation/expected-status-code-under-verify-response-contract-testing-testsigma.png) + +* On the same “Verify Response“ tab, select “Body Compare Type” as “JSON schema”, and under “Expected Content” add the JSON Schema to validate the REST API response. This JSON Schema will be the contract for testing your REST API. The added JSON Schema for our example is as seen in the screenshot below: + +![Expected body content under Verify Response Tab to execute contract testing with Testsigma](https://docs.testsigma.com/images/tutorials/rest-api-testing/json-schema-validation/expected-body-content-under-verify-response-contract-testing-testsigma.png) + +* When you execute the test case, the response from the added REST API will be validated against the added schema. If the response matches the JSON schema, the test case will be reported as “Passed”, else it would be reported as “Failed”. + +* If the test case fails, the failed criteria would be reported to you. For our example test case - when the required key “firstName” was not found in the response, the test case failed with the error “required key [firstName] not found”. As also shown in the screenshot below: + +![Error message, as reported in Testsigma, when a contract testing test case failed](https://docs.testsigma.com/images/tutorials/rest-api-testing/json-schema-validation/error-message-when-a-contract-testing-test-case-failed.png) diff --git a/src/pages/tutorials/test-cases/mobile-apps/build-tests-using-local-android-devices.md b/src/pages/tutorials/test-cases/mobile-apps/build-tests-using-local-android-devices.md index 060dcaf..f3cfa58 100644 --- a/src/pages/tutorials/test-cases/mobile-apps/build-tests-using-local-android-devices.md +++ b/src/pages/tutorials/test-cases/mobile-apps/build-tests-using-local-android-devices.md @@ -167,7 +167,7 @@ That’s it! * Try all options in Test Recorder. [Try it out!](https://testsigma.com/docs/test-cases/create-steps-recorder/ios-apps/overview/) -* Create Test Plans and Schedules using local devices. Head over to [this link!](https://testsigma.com/docs/test-management/plans/overview/) +* Create Test Plans and Schedules using local devices. Head over to [this link!](https://testsigma.com/docs/test-management/test-plans/overview/) * Try out more advanced capabilities. Check out our detailed [documentation](https://testsigma.com/docs/). diff --git a/src/pages/tutorials/test-cases/mobile-apps/build-tests-using-recorder.md b/src/pages/tutorials/test-cases/mobile-apps/build-tests-using-recorder.md index cf1a035..f990610 100644 --- a/src/pages/tutorials/test-cases/mobile-apps/build-tests-using-recorder.md +++ b/src/pages/tutorials/test-cases/mobile-apps/build-tests-using-recorder.md @@ -233,7 +233,7 @@ _This is a basic walk-through. For queries, reach us via the in-app chat or ping * Try all options in Test Recorder. [Try it out!](https://testsigma.com/docs/test-cases/create-steps-recorder/ios-apps/overview/) -* Create Test Plans and Schedules using local devices. Head over to [this link!](https://testsigma.com/docs/test-management/plans/overview/) +* Create Test Plans and Schedules using local devices. Head over to [this link!](https://testsigma.com/docs/test-management/test-plans/overview/) * Try out more advanced capabilities. Check out our detailed [documentation.](https://testsigma.com/docs/) diff --git a/src/pages/tutorials/test-plans/cross-platform-end-to-end-testing.md b/src/pages/tutorials/test-plans/cross-platform-end-to-end-testing.md new file mode 100644 index 0000000..2f650b9 --- /dev/null +++ b/src/pages/tutorials/test-plans/cross-platform-end-to-end-testing.md @@ -0,0 +1,108 @@ +--- +title: "How to do cross-platform end-to-end testing with Testsigma" +metadesc: "This document describes the step-by-step details of how to create a test plan for cross-platform end-to-end testing with Testsigma" +noindex: false +order: 4.2 +page_id: "Cross-Platform End-to-End Testing with Testsigma" +search_keyword: "Test Plans, Local devices, Testsigma Tutorials" +warning: false +contextual_links: +- type: section +- name: "Contents" +- type: link + name: "Pre-requisites" + url: "#pre-requisites" +- type: link + name: "Steps" + url: "#steps" +--- + +--- + +There will be scenarios when you would want to execute certain test cases on one platform and once those test cases are executed, certain other dependent test cases on a different platform. + +For example, for a flight booking application, you might book the flight on the desktop web and then could want to modify the bookings on your android application, and then you might want to cancel the bookings on your iPad application. + +The flow would look something like the below: + +* Book the flight on the desktop web + +* Modify the booking done in step 1 on the android application + +* Cancel the booking done in step 1 and modified in step 2, on the iPad application. + + +Today, when applications are made to provide the same experience on multiple different platforms - such a scenario is valid and common. With Testsigma, you can test such cross-platform end-to-end testing scenarios easily. + +Let’s see how cross-platform end-to-end test automation can be done with Testsigma: + + +--- +> ## [Pre-requisites](#pre-requisites) +> The test suites containing test cases for the above scenarios should be already there. That is, Test cases to: +> * Book the flight on the desktop web +> * Modify an existing booking on an android application +> * Cancel a booking on an iPad application + + +For the above, you should know how to: + +1. [Automate a test case in Testsigma](https://testsigma.com/docs/test-cases/manage/add-edit-delete/) +2. [Create a Test Suite in Testsigma](https://testsigma.com/docs/test-management/test-suites/overview/) +3. [Create a Test Plan in Testsigma](https://testsigma.com/docs/test-management/test-plans/overview/) + + +--- + +## [Steps](#steps) + +1. Add a Test Plan. + +2. Enter the Test Name. For example, below is how we have added the Test Name for our example Test case: + +![Step 1 to create a test plan](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/create-test-plan-step-1.png) + +3. Click on the Next Button on the ‘Create Test Plan’ Tab, the tab ‘Test Machines & Suites Selection’ Opens Up: + +![Step 2 to add test machines and suites for test plan execution](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/test-machines-and-suites-selection-step-2.png) + +4. On Tab 2, select the type as ‘Distributed Testing’ and select the Project containing the test suite, select the test suite, and select the test machine you want to execute it on. For our purpose, we chose “Simple Demo(Web)” as project, “Book Flight” as the test suite, and Latest Google Chrome on Windows 11 as the test machine. Below is a screenshot with the mentioned selections, for your reference: + +![add first test suite for e2e testing execution](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/add-first-test-suite-e2e-testing.png) + +5. Click on the ‘Add’ button to add this selection to test plan execution. Below is what you will see after clicking on the add button. + +![UI after adding first test suite for E2E testing on multiple platforms](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/after-adding-first-test-suite-e2e-testing.png) + +6. Now click on the big green ‘Add’ Button. Now you are ready to add another test execution combination (test suite + test machine) to the test plan. Below is a screenshot of how the screen appears: + +![Add second test execution to the E2E testing test case](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/add-second-test-execution-combination-e2e-testing.png) + +7. Here, choose the test suite for modifying booking for android ‘Modify Booking’, and choose the prerequisite as the test execution setting that was added in step 5. The test execution chosen in step 5, would appear as a drop-down for pre-requisites. Below is a screenshot of how the selection looks for our example E2E testing scenario: + +![The second test execution settings as selected for the E2E testing scenario](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/second-test-execution-selected.png) + +8. Click on the ‘Add’ Button to add this configuration to the test plan execution. + +9. Similarly, add another test execution combination (test suite + test machine) to the test plan - ‘Cancel Booking’ Test Suite for iOS. Below is how selection looks for the example E2E test scenario: + + +![The third test execution settings as selected for the E2E testing scenario](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/third-test-execution-selected.png) + +10. Now, click on the ‘Add’ Button to add this configuration to the test plan execution. Below is how all the added test executions look: + +![All test executions added for E2E testing scenario](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/final-test-executions-for-E2E-testing-scenario.png) + +11. Click on the ‘Next’ Button. On the third tab ‘Test Plan Settings’, you can add the edit the settings to suit your needs and click on the ‘Create’ Button at the bottom as also shown in the screenshot below: + +![The test plan settings tab for E2E testing scenario](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/test-plan-settings-E2E-testing-scenario.png) + +12. Once the test plan is created, you will be taken to the test plan page, as shown below: + +![Created Test Plan page for E2E testing scenario](https://docs.testsigma.com/images/tutorials/test-plans/cross-platform-end-to-end-testing/created-test-plan-page-E2E-testing-scenario.png) + +13. On the Test Plan Page, you can click on the ‘Run Now’ button to see the test plan in execution. You can click on the ‘View Reports’ button to go to report. The button is highlighted below: + +![Gif to demonstrate test execution of a multi-platform E2E testing scenarios](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/runs/test-plan-executions/e2e-testing-scenario-gif.gif) + +Alternatively, below is a gif demonstrating the above steps for configuring a cross-platform end-to-end test scenario with Testsigma: