Explore articles and tutorials on testing frameworks, automation tools, and best practices.
Visual Regression Testing for Small & Medium Screens in light and dark modes with Playwright
Posted on January 22, 2025
Performing visual regression testing for small and medium-sized screens (such as mobile and tablet devices) in both light and dark modes using Playwright
// Simulate iPhone 12
const iPhoneContext = await browser.newContext({
...iPhone,
});
const iPhonePage = await iPhoneContext.newPage();
await iPhonePage.goto('https://sergeipetrukhin.vercel.app');
const iPhoneScreenshot = await iPhonePage.screenshot();
expect(iPhoneScreenshot).toMatchSnapshot('iphone12.png');
await iPhoneContext.close();
Java QA Automation: Interview Questions Part 2
Posted on December 20, 2024
A continuation of the Java QA Automation interview series, focusing on advanced topics for automation engineers.
11. Singleton Design Pattern for WebDriver Management
12. Handling File Uploads in Selenium
13. Configuring Parallel Execution in TestNG and JUnit
14. Validating Tooltips in Selenium
15. DataProviders in TestNG for Data-Driven Testing
Explore Other Questions
Java QA Automation: Interview Questions Part 1
Posted on December 17, 2024
A first part of interview questions with answers for position Java QA Automation Enginner.
1. String Comparison: == vs .equals()
2. Waits in Selenium: Implicit, Explicit, Fluent Waits
3. Basic Selenium Script: Automating Login Page
4. Page Object Model (POM) Design Pattern
5. Opening a New Tab using WebDriver
Add Another Questions
Black Box Testing Techniques: A Comprehensive Guide
Posted on December 5, 2024
Discover various black box testing techniques and learn how they ensure quality by focusing on the external functionality of software systems.
1. Equivalence Partitioning
2. Boundary Value Analysis (BVA)
3. Decision Table Testing
4. State Transition Testing
5. Exploratory Testing
6. Error Guessing
Automating Playwright Tests with GitHub Actions
Posted on November 20, 2024
Learn how to automate your Playwright tests in a Next.js application using GitHub Actions.
name: Playwright Tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
...
Playwright visual regression testing
Posted on November 07, 2024
To detect visual problems with CSS, HTML, JS or even 404 error, nice feature of playwright is visual testing.
test('About page visual test with maxDiffPixels', async ({ page }) => {
await page.goto('https://sergeipetrukhin.vercel.app/about');
const screenshot = await page.screenshot();
expect(screenshot).toMatchSnapshot('aboutpage.png', {
maxDiffPixels: 100 // allows for up to 100 pixel differences
});
});
Playwright Locators
Posted on October 29, 2024
A list of posibble playwright locators to get elements using TypeScript.
// Fastest way: CSS selectors
const homeLink = page.locator('nav a.home');
await homeLink.click();
// Fastest way: ID selectors
const aboutLink = page.locator('#about-link');
await aboutLink.click();
Playwright First Test
Posted on October 21, 2024
A simple Playwright test to check the page title.
import { test, expect } from '@playwright/test';
test('homepage has Playwright in title', async ({ page }) => {
await page.goto('https://playwright.dev');
const title = await page.title();
expect(title).toBe('Fast and reliable end-to-end testing for modern web apps | Playwright');
});