Skip to content

Commit 345c4ef

Browse files
committed
readyapi
1 parent aa22ae0 commit 345c4ef

2 files changed

Lines changed: 27462 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# MailSlurp ReadyAPI demonstration
2+
3+
This project shows you how to use the [MailSlurp REST API](https://swagger.mailslurp.com/) to create email accounts and receive OTP codes within ReadyAPI test cases.
4+
5+
## Setup
6+
- Get a free [API Key](https://app.mailslurp.com) and set it as the `apiKey` Authorization JWT Bearer token.
7+
- Import the MailSlurp API from our [definitions endpoint](https://api.mailslurp.com/v2/api-docs/).
8+
- Run the test and inspect the steps.
9+
10+
## How it works
11+
This demo runs a test against a demo app with a sign-up and confirmation user flow. We can sign up with an email address and the app sends us a confirmation code that we must submit to confirm the user account. The steps are as follows:
12+
13+
- Call MailSlurp createInbox endpoint
14+
- Store the emailAddress and id as variables/properties
15+
- Submit emailAddress to the test app signUp endpoint
16+
- Call MailSlurps waitForLatestEmail endpoint with the id
17+
- Receive email and store emailId
18+
- Use MailSlurp contentMatch feature to extract the OTP code
19+
- Store OTP code as variable and submit it to test application confirm endpoint
20+
- Assert 200,201 status code for user confirmation
21+
22+
## Links
23+
- [API documentation](https://docs.mailslurp.com)

readyapi-mailslurp-example/mailslurp-examples.xml

Lines changed: 27439 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)