Skip to content

Instantly share code, notes, and snippets.

View PramodDutta's full-sized avatar
🎯
Focusing

Promode PramodDutta

🎯
Focusing
View GitHub Profile
@PramodDutta
PramodDutta / EncapsulationExample.java
Created August 16, 2023 11:12
Automation Engineer Interview Questions and Answers for 3 to 5 Years Exp
public class BankAccount {
private String accountNumber;
private double balance;
// Constructor
public BankAccount(String accountNumber, double initialBalance) {
this.accountNumber = accountNumber;
this.balance = initialBalance;
}
@PramodDutta
PramodDutta / ConstructorOverLoad.java
Created August 16, 2023 11:03
ConstructorOverLoad.java
public class Student {
private String name;
private int age;
// Default constructor
public Student() {
name = "Unknown";
age = 0;
}
@PramodDutta
PramodDutta / WebTablesTest.java
Created August 16, 2023 03:23
Find the Terminated Employee in Orange HR and delete it
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
public class WebTablesTest {
package com.tta.practice;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
public class AP01 {
@PramodDutta
PramodDutta / test_pytest.py
Created July 24, 2023 01:43
Get Token and Booking Id and Pass it to Update Request
# Crate , Update, Read, Delete
import pytest
# Request
# Faker
# PyTest
import requests
def test_get_req():
@PramodDutta
PramodDutta / API Test case.md
Created July 10, 2023 08:32
API Test case.mb

Sure, here are 15 test cases in table format:

Test Case No Test Case Description Input Expected Output
1 Verify response for valid zip code api.zippopotam.us/IN/110001 200 OK, {"post code": "110001", "country": "India", "country abbreviation": "IN", "places": ... }
2 Verify response for invalid zip code api.zippopotam.us/IN/999999 404 Not Found
3 Verify response for invalid country abbreviation api.zippopotam.us/XYZ/110001 404 Not Found
4 Verify response for country with no zip code api.zippopotam.us/IN/ 400 Bad Request
5 Verify response for valid zip code, case insensitivity in country code api.zippopotam.us/in/110001 200 OK, {"post code": "110001", "country": "India", "country abbreviation": "IN", "places": ... }
6 Verify response with additional parameters (should be ignored) api.zippopotam.us/IN/110001?param1=test 200 OK, {"post code": "110001", "country": "India", "countr
| Test Case No | Test Case Description | Input | Expected Output |
|--------------|----------------------|-------|-----------------|
| 1 | Verify response for valid zip code | api.zippopotam.us/IN/110001 | 200 OK, {"post code": "110001", "country": "India", "country abbreviation": "IN", "places": ... } |
| 2 | Verify response for invalid zip code | api.zippopotam.us/IN/999999 | 404 Not Found |
| 3 | Verify response for invalid country abbreviation | api.zippopotam.us/XYZ/110001 | 404 Not Found |
| 4 | Verify response for country with no zip code | api.zippopotam.us/IN/ | 400 Bad Request |
| 5 | Verify response for valid zip code, case insensitivity in country code | api.zippopotam.us/in/110001 | 200 OK, {"post code": "110001", "country": "India", "country abbreviation": "IN", "places": ... } |
| 6 | Verify response with additional parameters (should be ignored) | api.zippopotam.us/IN/110001?param1=test | 200 OK, {"post code": "110001", "country": "India", "country abbreviation": "IN", "places": ... } |
| 7 |
Sure, here are 15 test cases in table format:
| Test Case No | Test Case Description | Input | Expected Output |
|--------------|----------------------|-------|-----------------|
| 1 | Verify response for valid zip code | api.zippopotam.us/IN/110001 | 200 OK, {"post code": "110001", "country": "India", "country abbreviation": "IN", "places": ... } |
| 2 | Verify response for invalid zip code | api.zippopotam.us/IN/999999 | 404 Not Found |
| 3 | Verify response for invalid country abbreviation | api.zippopotam.us/XYZ/110001 | 404 Not Found |
| 4 | Verify response for country with no zip code | api.zippopotam.us/IN/ | 400 Bad Request |
| 5 | Verify response for valid zip code, case insensitivity in country code | api.zippopotam.us/in/110001 | 200 OK, {"post code": "110001", "country": "India", "country abbreviation": "IN", "places": ... } |
| 6 | Verify response with additional parameters (should be ignored) | api.zippopotam.us/IN/110001?param1=test | 200 OK, {"post code": "110001", "country": "India", "countr
pm.test("Status code is 200", function () {
// Postman has created their DSL - Domain Specific Language
// To write the Testcases
// Remeber?
pm.response.to.have.status(200);
});
pm.test("Response time is less than 1200ms", function () {
pm.expect(pm.response.responseTime).to.be.below(1200);
});
Scenario TID Test Scenario Test Case Id Test Data Test Case Title Precondition Steps to Execute Expected Result
Module: Login & Registration
TID001 User Login TC001 Valid credentials Verify successful user login User is on the login screen 1. Enter valid username and password
2. Tap on the "Login" button
User is logged in and directed to the home screen
TID002