Wednesday, July 9, 2025

Top 20 Test Cases for Common Web Applications – Login, Signup, Cart, Payment

Top 20 Test Cases for Common Web Applications – Login, Signup, Cart, Payment

Testing web applications involves validating all the key functionalities that users interact with most: Login, Signup, Shopping Cart, and Payment. This article provides positive and negative test scenarios with structured test case tables for each module.


๐Ÿ” 1. Login Module – Test Cases

#Test ScenarioTest StepsExpected ResultType
1 Login with valid credentials Enter valid email and password, click Login User is logged in and dashboard is shown Positive
2 Login with invalid password Enter valid email and wrong password, click Login Error message is shown Negative
3 Login with empty fields Click Login without entering any data Validation messages are displayed Negative
4 Remember Me functionality Check "Remember Me", login, logout, revisit login page Email should be pre-filled Positive
5 Forgot password link Click "Forgot Password", enter email Password reset link is sent Positive

๐Ÿ“ 2. Signup Module – Test Cases

#Test ScenarioTest StepsExpected ResultType
6 Signup with valid details Fill form with valid data and submit Account is created successfully Positive
7 Email already registered Enter an already used email and submit Error: Email already exists Negative
8 Signup with weak password Enter a password like "123" Error: Weak password warning Negative
9 Password and Confirm Password mismatch Enter different passwords Error: Passwords do not match Negative
10 Signup without accepting terms Leave "Terms & Conditions" unchecked and submit Error: Must accept terms Negative

๐Ÿ›’ 3. Shopping Cart – Test Cases

#Test ScenarioTest StepsExpected ResultType
11 Add product to cart Click "Add to Cart" on a product Product appears in cart Positive
12 Remove product from cart Click "Remove" in cart page Product is removed Positive
13 Change product quantity Increase quantity from 1 to 3 Total price updates correctly Positive
14 Cart total calculation Add multiple products, verify total Cart total is correct Positive
15 Checkout with empty cart Click checkout without any items Warning: Cart is empty Negative

๐Ÿ’ณ 4. Payment Module – Test Cases

#Test ScenarioTest StepsExpected ResultType
16 Payment with valid card Enter valid card details and click Pay Payment successful message Positive
17 Payment with invalid card number Enter fake card number Error: Invalid card Negative
18 Payment with expired card Enter an expired card Error: Card expired Negative
19 Payment network failure Simulate network loss during payment Transaction failed, retry option shown Negative
20 Redirect after payment Complete payment User is redirected to order confirmation Positive

๐Ÿ“Œ Summary

  • Login & Signup: Focus on security and validation
  • Cart: Focus on calculations and user actions
  • Payment: Focus on edge cases, failures, and redirects

These 20 test cases provide a strong base for functional testing of any eCommerce or SaaS platform. For complete test suites, consider adding boundary value tests, API validations, and browser compatibility checks.

๐Ÿ‘‹ Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

๐Ÿ“ฌ Contact Me | LinkedIn | GitHub

๐Ÿ“Œ Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

Selenium WebDriver Interview Questions with Java Code – Real-Time Examples

Selenium WebDriver Interview Questions with Java Code – Real-Time Examples

Are you preparing for a Selenium WebDriver interview? Below are the most frequently asked Selenium interview questions with Java code examples. These cover real-time scenarios and will help both freshers and experienced testers gain confidence.


1. What is Selenium WebDriver?

Selenium WebDriver is a web automation tool used to automate browser actions like clicking, typing, navigating, etc. It provides a programming interface to create and run test cases.

Java Example:

WebDriver driver = new ChromeDriver();
driver.get("https://example.com");
driver.findElement(By.id("login")).click();
---

2. How do you launch a browser in Selenium?

Using the WebDriver interface and browser-specific driver classes like ChromeDriver or FirefoxDriver.

Java Example:

System.setProperty("webdriver.chrome.driver", "path/to/chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://google.com");
---

3. How to locate elements in Selenium?

Using locators: id, name, className, cssSelector, xpath, linkText, tagName

Java Example:

driver.findElement(By.id("username")).sendKeys("admin");
driver.findElement(By.name("password")).sendKeys("admin123");
driver.findElement(By.xpath("//button[@type='submit']")).click();
---

4. What is the difference between findElement() and findElements()?

findElement()findElements()
Returns single WebElementReturns a list of WebElements
Throws NoSuchElementException if not foundReturns empty list if not found
---

5. How do you handle dropdowns in Selenium?

Using the Select class.

Java Example:

WebElement dropdown = driver.findElement(By.id("country"));
Select select = new Select(dropdown);
select.selectByVisibleText("India");
---

6. How to handle alerts in Selenium?

Java Example:

Alert alert = driver.switchTo().alert();
System.out.println(alert.getText());
alert.accept(); // or alert.dismiss();
---

7. How do you handle multiple windows in Selenium?

String parent = driver.getWindowHandle();
Set<String> allWindows = driver.getWindowHandles();
for (String window : allWindows) {
    if (!window.equals(parent)) {
        driver.switchTo().window(window);
        driver.close();
    }
}
driver.switchTo().window(parent);
---

8. How to perform mouse hover in Selenium?

Actions action = new Actions(driver);
WebElement menu = driver.findElement(By.id("menu"));
action.moveToElement(menu).perform();
---

9. How do you handle dynamic elements?

Use dynamic XPath or wait strategies like explicit wait.

Example using XPath:

//input[contains(@id, 'user')]

Example using Explicit Wait:

WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("username")));
---

10. What are Waits in Selenium?

  • Implicit Wait – waits globally
  • Explicit Wait – waits for specific conditions
  • Fluent Wait – waits with polling interval

Example – Implicit Wait:

driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
---

11. How do you take a screenshot in Selenium?

TakesScreenshot ts = (TakesScreenshot) driver;
File src = ts.getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(src, new File("screenshot.png"));
---

12. How do you handle frames?

driver.switchTo().frame("frameName");
// Perform actions inside frame
driver.switchTo().defaultContent();
---

13. How do you perform scrolling in Selenium?

JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("window.scrollBy(0,500)");
---

14. How do you validate a page title or URL?

Assert.assertEquals(driver.getTitle(), "Expected Title");
Assert.assertTrue(driver.getCurrentUrl().contains("dashboard"));
---

15. What is Page Object Model (POM)?

POM is a design pattern where each web page is represented as a class. Elements are defined as variables, and actions are methods.

Example:

public class LoginPage {
  WebDriver driver;
  
  @FindBy(id="username") WebElement username;
  @FindBy(id="password") WebElement password;
  @FindBy(id="login") WebElement loginBtn;

  public LoginPage(WebDriver driver) {
    PageFactory.initElements(driver, this);
  }

  public void login(String user, String pass) {
    username.sendKeys(user);
    password.sendKeys(pass);
    loginBtn.click();
  }
}
---

16. How do you run tests in multiple browsers?

Use WebDriverManager and pass the browser as a parameter.

WebDriver driver;
if(browser.equals("chrome")){
   WebDriverManager.chromedriver().setup();
   driver = new ChromeDriver();
} else if(browser.equals("firefox")){
   WebDriverManager.firefoxdriver().setup();
   driver = new FirefoxDriver();
}
---

17. What is the difference between get() and navigate().to()?

  • get() – loads a new page
  • navigate().to() – can be used to go forward/backward in history
---

18. What is the difference between driver.close() and driver.quit()?

  • close() – closes current browser window
  • quit() – closes all windows and ends session
---

19. How to handle file upload?

driver.findElement(By.id("upload")).sendKeys("C:\\path\\file.txt");
---

20. How to handle file download in Selenium?

File download requires browser settings using ChromeOptions or FirefoxProfile to set download paths.

---

๐Ÿ‘‹ Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

๐Ÿ“ฌ Contact Me | LinkedIn | GitHub

๐Ÿ“Œ Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

Top 30 Manual Testing Interview Questions and Answers for Freshers & Experienced

Top 30 Manual Testing Interview Questions and Answers for Freshers & Experienced

This article covers the most frequently asked manual testing questions with real-time examples, concepts like STLC, bug life cycle, and test techniques. Suitable for both freshers and experienced professionals.


1. What is Software Testing?

Software Testing is the process of evaluating a software application to identify defects and ensure it meets the specified requirements.

Real-Time Scenario: Before launching an e-commerce website, testers validate the cart, payment, and checkout functionalities to avoid issues post-launch.

2. What are the different types of Software Testing?

  • Manual Testing
  • Automation Testing
  • Functional Testing
  • Non-Functional Testing (Performance, Security, Usability)
  • Unit Testing
  • Integration Testing
  • System Testing
  • Acceptance Testing

3. What is the Software Testing Life Cycle (STLC)?

STLC is a sequence of activities conducted during testing:

  1. Requirement Analysis
  2. Test Planning
  3. Test Case Development
  4. Test Environment Setup
  5. Test Execution
  6. Test Cycle Closure

Real-Time Example: In a banking app, STLC ensures that login, balance view, and fund transfer are tested in an organised manner.

4. What is the difference between Verification and Validation?

CriteriaVerificationValidation
DefinitionAre we building the product right?Are we building the right product?
Activity TypeStaticDynamic
ExamplesReviews, WalkthroughsTesting, UAT

5. Explain the Bug Life Cycle.

States: New → Assigned → Open → Fixed → Retest → Verified → Closed
Alternate States: Rejected, Deferred, Duplicate

Real-Time Scenario: A user reports login failure → Developer fixes it → Tester retests → Marks as Verified → Closed.

6. What is a Test Case?

Test Case IDTC_001
FunctionalityLogin
Steps1. Enter username
2. Enter password
3. Click Login
Expected ResultThe dashboard is displayed

7. What is the difference between a Test Case and a Test Scenario?

FeatureTest CaseTest Scenario
Detail LevelVery detailedHigh-level idea
ExampleValidate login with valid credsTest login functionality

8. What is a Defect?

A defect is a deviation from the expected result in the application.

Example: The Login button does not redirect to the home page.

9. What is Severity and Priority?

TermDefinitionExample
SeverityImpact of the defect on the systemApp crashes → High Severity
PriorityThe order in which the defect should be fixedFixing login issue → High Priority

10. What is Regression Testing?

Testing existing functionality to ensure new changes haven't broken anything.

Real-Time Scenario: After adding a "Save for Later" feature, re-test the cart, checkout, and payment flows.

11. What is Retesting?

Testing the defect after it’s fixed to verify it's resolved.

12. Difference Between Smoke and Sanity Testing?

FeatureSmoke TestingSanity Testing
PurposeBasic build verificationVerify bug fixes/functional areas
TimeInitial buildAfter a minor release

13. What is Exploratory Testing?

Testing where test cases are not predefined. Tester explores the app on the fly.

Example: While testing a new travel app, testers explore unusual booking combinations.

14. What is Ad-hoc Testing?

Unplanned testing without documentation.

15. What is UAT (User Acceptance Testing)?

Testing is done by the end-user/client to confirm that the system meets business needs.

16. Difference Between Functional and Non-Functional Testing?

FeatureFunctional TestingNon-Functional Testing
FocusWhat system doesHow well does the system perform
ExampleLogin, SignupLoad time, security, UI usability

17. What is a Test Plan?

A document describing test scope, approach, resources, and schedule.

18. Explain Different Test Techniques.

  • Equivalence Partitioning
  • Boundary Value Analysis
  • Decision Table Testing
  • State Transition
  • Error Guessing

19. What is Boundary Value Analysis?

Test inputs at the edge of input ranges.

Example: For age 18–60, test 17, 18, 60, 61.

20. What is Equivalence Partitioning?

Divides input data into valid and invalid classes.

21. What is a Traceability Matrix?

A document mapping requirements with test cases.

Requirement IDTest Case ID
REQ-001TC-001, TC-002

22. How do you handle a situation when a developer disagrees with your defect?

  • Provide clear defect steps
  • Attach screenshots or logs
  • Discuss in defect triage meetings
  • Use severity & requirement mapping

23. Explain a real-time scenario where you found a critical bug.

Example: In a food delivery app, placing an order deducted payment, but didn’t place the order. Severity: High, Priority: High.

24. What is Test Data?

Data used during test execution, e.g., usernames, passwords, and product IDs.

25. What are Entry and Exit Criteria?

Entry Criteria: Preconditions before testing start.
Exit Criteria: Conditions to conclude testing.

26. What is Compatibility Testing?

Testing on different browsers, devices, and OS.

27. How do you log bugs in a bug tracking tool (e.g., JIRA)?

  1. Select project
  2. Click “Create Issue”
  3. Fill Summary, Steps to Reproduce, Environment, Severity
  4. Attach screenshot/log
  5. Assign to the developer

28. What is Risk-Based Testing?

Prioritising testing modules based on business impact and failure probability.

29. What is the difference between QA and QC?

QA (Quality Assurance)QC (Quality Control)
Process-orientedProduct-oriented
Prevent defectsIdentify defects

30. How do you ensure test coverage?

  • Use requirement traceability
  • Review test cases against each requirement
  • Conduct peer reviews
  • Track coverage in tools like TestLink or Excel

๐Ÿ‘‹ Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

๐Ÿ“ฌ Contact Me | LinkedIn | GitHub

๐Ÿ“Œ Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

Top 15 Test Cases for Login Page – Manual & Automation Examples (With Bug Scenarios)

Top 15 Test Cases for Login Page – Manual & Automation Examples (With Bug Scenarios)

Testing a login page is one of the most important tasks in software testing. Whether you’re preparing for a QA interview or writing real-time test cases for your web or mobile application, a login module provides many critical validations. In this post, you’ll learn manual test cases, common bugs, and Selenium automation examples for login functionality.

๐Ÿ” Why Login Page Testing Is Important?

  • The first point of user interaction with the app
  • Security entry point – needs proper validation
  • The most common area where users face errors

๐Ÿ“ Top 15 Manual Test Cases for Login Page

Test Case ID Scenario Test Steps Expected Result
TC001 Valid username and password Enter valid credentials and click Login The user should be redirected to the dashboard
TC002 Invalid password Enter a valid username and the wrong password The error message should appear
TC003 Blank username and password Leave both fields blank and click Login Validation messages should be displayed
TC004 Blank username only Leave the username blank, enter the password, and click Login The username required message should appear
TC005 Blank password only Enter username, leave the password blank, click Login Password required message should appear
TC006 SQL injection attempt Enter "admin' OR 1=1--" as the username Input should be rejected and sanitized
TC007 Special characters in the username Enter special characters like '@#$%' Error or input validation message should appear
TC008 The password field is masked Check if the password is displayed as dots or asterisks Characters should be hidden
TC009 Remember Me checkbox Select the checkbox and log in The user should stay logged in on the next visit
TC010 Forgot Password link Click the link and validate the navigation The user should go to the reset password screen
TC011 Case sensitivity Enter uppercase instead of lowercase username The system should handle case sensitivity properly
TC012 Browser Back button after login Log in successfully and press the browser back button The user should not return to the login page or see cached content
TC013 Multiple failed login attempts Try logging in with the wrong password 5 times Account lock or CAPTCHA should appear
TC014 Login session timeout Login and remain idle The session should expire after the defined timeout
TC015 Mobile responsiveness Open the login page on mobile devices The login form should render correctly on smaller screens

๐Ÿž Common Bug Scenarios on Login Page

  • Login accepts invalid email or empty credentials
  • The password is visible even after clicking the "eye" toggle
  • No validation messages for blank fields
  • Incorrect redirect after login
  • The session has not expired after logging out

๐Ÿค– Selenium Automation Example – Valid Login Test


@Test
public void validLoginTest() {
    WebDriver driver = new ChromeDriver();
    driver.get("https://example.com/login");
    
    driver.findElement(By.id("username")).sendKeys("testuser");
    driver.findElement(By.id("password")).sendKeys("testpass");
    driver.findElement(By.id("loginBtn")).click();
    
    String expectedTitle = "Dashboard";
    String actualTitle = driver.getTitle();
    Assert.assertEquals(actualTitle, expectedTitle);

    driver.quit();
}

This Selenium test script verifies a successful login using valid credentials. You can also write negative test cases using invalid passwords and assert error messages.

๐Ÿ‘‹ Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

๐Ÿ“ฌ Contact Me | LinkedIn | GitHub

๐Ÿ“Œ Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

Role of AI in Software Testing – What’s Changing?

๐Ÿ” Role of AI in Software Testing – What’s Changing?

Artificial Intelligence (AI) is revolutionizing software testing by automating complex tasks, enhancing accuracy, and speeding up delivery cycles. Traditional manual and scripted automation testing often require significant human effort and time. AI brings intelligence, learning capability, and efficiency to testing processes.

๐Ÿง  Traditional Testing vs AI-Driven Testing

Feature/Aspect Traditional Testing AI-Driven Testing
Test Case Creation Manual or script-based Auto-generated using ML from usage patterns
Test Execution Manual or automated scripts Intelligent execution, self-healing scripts
Defect Prediction Based on past human knowledge Predicts based on data patterns
Test Maintenance High effort for UI changes AI auto-updates test cases (self-healing)
Data Handling Manually prepared test data AI generates synthetic test data
Test Coverage Based on human planning Expanded through AI-driven analysis

๐Ÿš€ Key Ways AI Is Changing Software Testing

1. Test Case Generation

AI analyzes user behavior, logs, and requirements to automatically generate test cases. This saves time and reduces missed edge cases.

2. Test Suite Optimization

AI identifies redundant or low-value test cases, prioritizing high-risk areas for faster regression cycles.

3. Self-Healing Test Scripts

When UI changes occur (e.g., button ID or label changes), AI automatically updates scripts without manual intervention.

4. Defect Prediction and Root Cause Analysis

Machine Learning models can predict bugs based on historical data and help identify the root cause of test failures.

5. Visual Testing with AI

AI-based visual tools like Applitools use image recognition to detect layout/UI bugs traditional testing might miss.

6. Natural Language Processing (NLP)

Tools like Testim and Mabl use NLP to convert plain English into test cases, simplifying test writing.

7. AI in Performance Testing

AI detects performance bottlenecks, predicts infrastructure needs, and smartly scales during load testing.

๐Ÿงช Tools Using AI in Testing

Tool AI Features Included
Testim AI-based test case generation and maintenance
Mabl Intelligent test execution, self-healing tests
Applitools Visual AI testing and UI validation
Functionize NLP-based test creation and execution
ACCELQ Autonomous test generation and planning

✅ Benefits of AI in Testing

  • Faster time to market
  • Reduced manual effort
  • Improved accuracy
  • Smarter test coverage
  • Adaptive to frequent changes (Agile/CI-CD)

๐Ÿงฉ Challenges & Considerations

  • Initial tool learning curve and training data needs
  • False positives/negatives from poorly trained models
  • Still requires human validation for business logic
  • Limited in certain non-functional testing areas (e.g., accessibility)

๐Ÿ”ฎ The Future Outlook

AI won’t replace testers — it will augment human capabilities. Testers will focus more on strategy, data science, and model validation as routine tasks become automated.

Summary:
“AI in software testing is not just a trend – it’s a shift. Testers are becoming test engineers, using AI to shift from doing to deciding.”

๐Ÿ‘‹ Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

๐Ÿ“ฌ Contact Me | LinkedIn | GitHub

๐Ÿ“Œ Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.