0% found this document useful (0 votes)
43 views

Instruction: 1. Test Duration 2 Hours.: Scenario1: Scenario 2

The document outlines 5 test scenarios - the first involves logging into a website and adding a product to cart, while the second covers flight searches on another site. It also provides instructions for developers to create API tests to register weather stations, validate the registration, and delete the stations.

Uploaded by

Avinash Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Instruction: 1. Test Duration 2 Hours.: Scenario1: Scenario 2

The document outlines 5 test scenarios - the first involves logging into a website and adding a product to cart, while the second covers flight searches on another site. It also provides instructions for developers to create API tests to register weather stations, validate the registration, and delete the stations.

Uploaded by

Avinash Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Instruction:

1. Test Duration 2 hours.


2. Use Page Factory Pattern
3. Create a maven project
4. Test should run with TestNG xml
5. Locators precedence is direct locators/css only
6. Use of Internet is permitted
7. Use any Rest API Client for the API Scenario

Scenario1: Scenario 2:

1. Navigate to www.jetblue.com
1. Login to http://Automationpractice.com / 2. Sign in with Username: [email protected]
2. Sign in using the credentials: and Password: Jetblue1234
a. username: [email protected] & 3. Assert that the following tabs are
password: jetblue Present: Flights Flights+Hotels Hotels
3. Select the category as T-Shirts Cars Cruises
4. Click on the product: Faded Short Sleeve 4. Select From as Austin, TX (AUS)
T-shirts 5. Select To as Tallahassee, FL (TLH)
5. Click on Add to Cart 6. Depart Date and Return Date as any
6. Click on proceed to checkout future dates
7. Assert the message "Product successfully 7. select Travelers as 2 Adults
added to your shopping cart" is displayed 8. Click on Search Flights
followed by the listed values: 9. select First flight option
Faded Short Sleeve T-shirts 10. Assert Price in the itinerary
Orange, S 11. click on Continue
Quantity (whatever is on the cart) 12. Assert Departs and Arrives and Estimated
Total $16.51 * quantity Total
13. Fill details of Traveler2
14. Click on Continue
15. Verify Assertion "Address Line1 should be
maximum 40 characters long"
16. Click View another currency
17. Select INR
18. Assert Currency INR
19. Close pop up
20. Logout from Application

Scenario 3
Use the following URL to write the test. Please note that you will to register with the website in order to
utilise their API:

https://openweathermap.org/stations

Using the API specification detailed in the URL above, develop the following tests(Each # is one test)

1. Validate that attempt to register a weather station without an API key will return the following
in message body.

HTTP RESPONSE CODE: 401


RESPONSE MESSAGE: "Invalid API key. Please see http://openweathermap.org/faq#error401
for more info."

2. Successfully register two stations with the following details and verify that HTTP response code
is 201.

"external_id": "DEMO_TEST001",
"name Interview Station <Random Number>", "latitude": 33.33,
"longitude": -111.43,
"altitude": 444

"external_id": "Interview1 ",


"name": "Interview Station <Random Number>", "latitude": 33.44,
"longitude": -12.44,
"altitude": 444

3. Using “[GET] /stations” API verify that the stations were successfully stored in the DB and their
values are the same as specified in the registration request.

4. Delete both of the created stations and verify that returned HTTP response is 204.

5. Repeat the previous step and verify that returned HTTP response is 404 and that message body
contains “message”: “Station not found".

You might also like