-
Create an account in Mockapi.io and set up an endpoint for Bank Transactions (All information should be embedded in the same API, i.e., only 1 endpoint required).
-
Structure the project making the requests reusable, avoid to repeat code or the endpoints, use TestNG and create a Readme.md with the specifications and steps to run the exercise and ass a gitIgnore.
-
For every request please make sure to include at least an assertion for the Status Code (Use POJOs to manage response data not just the body). Please make sure you use JavaDoc.
-
Create the following tests using the Bank transactions endpoint:
-
@Test 1 > Verify the Endpoint is empty(If it has any data use the DELETE request to clean and leave empty).
- Gets the information registered in the API executing a GET request.
- Transforms the JsonString into a List of JavaObjects type BankTransactionPojo.
- Validates if there is any transaction in the list.
- Wipes the existing transactions deleting one by one from API through DELETE method.
- Retrieves the information from API and stores it again.
- Validates if there is any transaction registered.
- Transaction number should be 0.
-
@Test 2 > Initialize the POJO with 10 random data (Use the minimal requirements). Also make a code verification for avoiding duplicate email accounts. Then perform the POST request.
- Initializes the data in the API with 10 random transactions.
- Validates the number of transaction created by retrieving the information from API and storing it again.
- Creates a Transaction instance with a test email. Validates if the email exists in the local list. If not, performs a POST with the new transaction.
- Validates if the Status code is 200. If so, the POST was successful.
- It tries to send the transaction with the same email. The POST cannot be sent.
-
@Test 3 > Make the GET request, asserting that there are not duplicate email accounts.
- Gets the data from API and stores it locally.
- Streams the emails in the list validating there is no duplicated email accounts.
- Compares the number of unique emails with the number of transactions stored.
-
@Test 4 > Add a test to update an existing AccountNumber.
- Sends a PUT request to transaction with ID 1 tu update account with number 12345678.
- Validates the StatusCode to be 200.
-
finalapiautomationrestassured's Introduction
finalapiautomationrestassured's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.