This repository contains an automated test suite for the Tier IV website (https://tier4.jp), created as part of the Tier IV recruitment assessment.
Target Website: https://tier4.jp
Testing Framework: Playwright + TypeScript
CI/CD Platform: GitHub Actions
Design Pattern: Page Object Model (POM)
Total Test Cases: 58 test cases × 3 browsers = 174 automated tests
Test ID: TC001
Priority: High
Objective: Verify that the header navigation menu is functional and all key header elements are accessible.
Preconditions:
- Browser is open
- Internet connection is available
Test Steps:
- Navigate to https://tier4.jp
- Wait for page to fully load
- Verify page title contains "Tier IV"
- Locate main navigation menu in header
- Verify the following navigation links are visible and clickable:
- ABOUT US (Opens in same tab, preserves language)
- OPEN SOURCE (Opens in same tab, preserves language)
- OUR PRODUCTS (Opens in same tab, preserves language)
- SERVICES (Opens in new tab → services.tier4.jp)
- ALLIANCE (Opens in same tab, preserves language)
- OUR TEAM (Opens in same tab, preserves language)
- CAREERS (Opens in new tab → careers.tier4.jp)
- MEDIA (Opens in same tab, preserves language)
- Click each link and verify correct page navigation
- Click logo and verify return to homepage
- Verify hamburger menu (for language switching) is visible and functional
Expected Results:
- Homepage loads within 5 seconds
- Page title is correct
- All navigation links are visible
- Navigation links are clickable
- Each link navigates to correct page
- Language context is properly preserved
- No console errors appear
Automated Test Cases:
- TC001-01 ~ TC001-03: Basic tests (homepage load, navigation visibility)
- TC001-04 ~ TC001-09: Same-tab navigation tests (About Us, Open Source, Products, Alliance, Team, Media)
- TC001-10 ~ TC001-11: New-tab navigation tests (Services, Careers)
- TC001-12 ~ TC001-14: UI elements tests (Logo, hamburger menu, heading)
- TC001-15 ~ TC001-18: Edge cases (Responsive, back navigation, console errors, clickability)
Test ID: TC002
Priority: High
Objective: Verify that the language switcher toggles between English, Japanese, and Chinese correctly.
Preconditions:
- Browser is open
- User is on Tier IV homepage
Test Steps:
- Navigate to https://tier4.jp
- Open hamburger menu
- Locate language switcher (EN/JP/CN options)
- Note current language (default is usually Japanese)
- Click on "EN" (English) option
- Verify page content changes to English
- Verify URL updates (may include /en/ path)
- Click on "JP" (Japanese) option
- Verify page content changes back to Japanese
- Click on "CN" (Chinese) option
- Test all language transition combinations (EN→JP, JP→CN, CN→EN, etc.)
- Verify language preference persists across navigation
Expected Results:
- Language switcher is visible and accessible
- Clicking EN changes content to English
- Clicking JP changes content to Japanese
- Clicking CN changes content to Chinese
- URL reflects language change
- Language selection persists during session
- No layout breaks occur during language switch
- Browser back button handles language state correctly
- Language selection maintained after page reload
Automated Test Cases:
- TC002-01: Hamburger menu and language switcher visibility
- TC002-02 ~ TC002-04: Basic language switching (JP, CN, EN↔JP)
- TC002-05 ~ TC002-06: Language persistence and URL updates
- TC002-07: Page content verification in all three languages (JP, EN, CN)
- TC002-08 ~ TC002-09: Layout stability and multiple switches
- TC002-10 ~ TC002-14: Edge cases (Browser back, page reload, complete 3×3 transition matrix: JP↔CN, CN↔JP, CN↔EN)
Test ID: TC003
Priority: Medium
Objective: Verify that footer contains all required links and they are functional.
Preconditions:
- Browser is open
- User is on Tier IV homepage
Test Steps:
- Navigate to https://tier4.jp
- Scroll to bottom of page to footer section
- Verify footer is visible
- Verify the following footer sections exist:
- Legal Links:
- CONTACT (Same tab)
- PRIVACY POLICY (Same tab)
- COOKIE POLICY (Same tab)
- CODE OF CONDUCT (Same tab)
- HUMAN RIGHTS POLICY (Same tab)
- MEDIA KIT (New tab, always English)
- Social Media Links:
- LinkedIn (New tab)
- Twitter/X (New tab)
- YouTube (New tab)
- Facebook (New tab)
- Instagram (New tab)
- GitHub (New tab → autowarefoundation/autoware)
- Legal Links:
- Click each legal link and verify correct page navigation
- Click each social media icon and verify it opens in new tab
- Verify social media links direct to official Tier IV profiles
- Change language and verify footer structure is maintained
Expected Results:
- Footer is visible on all pages
- All footer links are present
- Footer links are clickable
- Legal links load correct pages
- Social media links open in new tabs
- Social media links direct to correct profiles
- No broken links (404 errors)
- Footer maintains structure across languages
- Footer is accessible via keyboard navigation
Automated Test Cases:
- TC003-01 ~ TC003-04: Basic tests (Footer visibility, link count, link texts, social media presence)
- TC003-05 ~ TC003-09: Same-tab legal links (Contact, Privacy, Cookie Policy, Code of Conduct, Human Rights)
- TC003-10 ~ TC003-16: New-tab links (Media Kit, LinkedIn, Twitter/X, YouTube, Facebook, Instagram, GitHub)
- TC003-17 ~ TC003-26: Edge cases (Keyboard navigation, page reload, responsive design, cross-language consistency, URL verification)
Separates test logic from page-specific code, improving maintainability and reusability. Each page has its own class with methods and locators.
// Example: HomePage.ts
export class HomePage extends BasePage {
private readonly careersLink: Locator;
async clickCareersLink(): Promise<void> {
await this.click(this.careersLink);
}
}Common functionality inherited by all page objects. Reduces code duplication and centralizes common actions.
// Example: BasePage.ts
export class BasePage {
async click(locator: Locator): Promise<void> {
await locator.waitFor({ state: 'visible' });
await locator.click({ force: true });
}
}Represents reusable components (footer, header, etc.) as separate objects.
// Example: FooterComponent.ts
export class FooterComponent extends BasePage {
async clickContactLink(): Promise<void> {
await this.scrollToFooter();
await this.dismissCookieConsent();
await this.clickAndNavigateWithRetry(this.contactLink, 3);
}
}Automatic retry logic to handle flaky tests in CI environments. Especially effective for WebKit browser new tab operations and navigation failures.
// Example: Retry logic in FooterComponent.ts
private async clickLinkWithRetry(locator: Locator, maxAttempts: number = 3): Promise<Page> {
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
try {
const [newPage] = await Promise.all([
this.page.context().waitForEvent('page', { timeout: 30000 }),
this.click(locator)
]);
await newPage.waitForLoadState('domcontentloaded', { timeout: 30000 });
return newPage;
} catch (error) {
if (attempt < maxAttempts) {
await this.wait(1000 * attempt); // Exponential backoff
await this.scrollToFooter();
await this.dismissCookieConsent();
await this.wait(500);
}
}
}
throw lastError || new Error('Failed to open new tab after retries');
}tierIV-qa-automation-Jerome/
├── .github/
│ └── workflows/
│ └── playwright.yml # CI/CD configuration
├── tests/
│ ├── header.spec.ts # TC001: Header navigation tests (18 tests)
│ ├── language-switcher.spec.ts # TC002: Language switching tests (14 tests)
│ └── footer.spec.ts # TC003: Footer validation tests (26 tests)
├── pages/
│ ├── BasePage.ts # Base class with common functionality
│ ├── HomePage.ts # Homepage page object
│ └── FooterComponent.ts # Footer component object with retry logic
├── playwright.config.ts # Playwright configuration
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── auth.json # Authentication state storage
├── .gitignore # Git ignore rules
└── README.md # This file
- Node.js (v18 or higher)
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/YOUR_USERNAME/tierIV-qa-automation-Jerome.git cd tierIV-qa-automation-Jerome -
Install dependencies
npm install
-
Install Playwright browsers
npx playwright install
Run all tests
npm testRun tests on specific browser
npm test -- --project=chromium
npm test -- --project=firefox
npm test -- --project=webkitRun specific test file
npx playwright test tests/header.spec.ts
npx playwright test tests/language-switcher.spec.ts
npx playwright test tests/footer.spec.tsRun tests in headed mode
npx playwright test --headedRun tests in debug mode
npx playwright test --debugGenerate and open HTML report
npx playwright show-reportThe project uses GitHub Actions for continuous integration.
- Push to
mainbranch - Pull requests to
mainbranch - Manual workflow dispatch
- Checks out code
- Sets up Node.js environment
- Installs dependencies
- Installs Playwright browsers
- Runs all tests in parallel
- Uploads test reports as artifacts
- Go to "Actions" tab in GitHub repository
- Click on latest workflow run
- Download "playwright-report" artifact to view detailed results
- Parallel execution: Tests run concurrently for faster feedback
- Multiple browsers: Tests run on Chromium, Firefox, and WebKit
- Automatic retries: Retries failed tests up to 2 times
- Artifact retention: Test reports stored for 30 days
- Always runs: Report generation happens even if tests fail
After running tests, an HTML report is generated with:
- Test execution summary
- Screenshots on failure
- Video recordings (if enabled)
- Detailed step-by-step logs
- Performance metrics
View report locally:
npx playwright show-reportIn GitHub Actions:
- Navigate to Actions tab
- Click on workflow run
- Scroll to "Artifacts" section
- Download "playwright-report.zip"
- Extract and open "index.html"
- Full TypeScript implementation
- No
anytypes - Proper interfaces and types
// Example: Type-safe page object
export class HomePage extends BasePage {
private readonly careersLink: Locator;
async clickCareersLink(): Promise<void> { }
async isHomePageLoaded(): Promise<boolean> { }
}- Graceful handling of timeouts
- Clear error messages
- Proper assertions
- Retry mechanisms for flaky operations
// Example: Error handling with retry
try {
const [newPage] = await Promise.all([
this.page.context().waitForEvent('page', { timeout: 30000 }),
this.click(locator)
]);
return newPage;
} catch (error) {
if (attempt < maxAttempts) {
console.log(`Retry attempt ${attempt}/${maxAttempts - 1}`);
await this.wait(1000 * attempt); // Exponential backoff
}
}- Single Responsibility Principle
- DRY (Don't Repeat Yourself)
- Clear naming conventions
- Separation of logic and data
- Each test can run independently
- No test depends on another
- Proper setup and teardown
- State isolation
- Page Object Model for easy updates
- Centralized locators
- Reusable utility functions
- Clear documentation
| Test Suite | Test Cases | Tests per Browser | Total Tests | Status |
|---|---|---|---|---|
| TC001: Header Navigation | 18 | 18 × 3 = 54 | 54 | |
| TC002: Language Switcher | 14 | 14 × 3 = 42 | 42 | |
| TC003: Footer Validation | 26 | 26 × 3 = 78 | 78 | |
| Total | 58 | 58 × 3 | 174 | **** |
| Browser | Tests | Pass Rate | Notes |
|---|---|---|---|
| Chromium | 58 | ~100% | Fastest execution (~9 min in CI) |
| Firefox | 58 | ~100% | Stable execution (~8 min in CI) |
| WebKit | 58 | ~95-100% | Slower execution (~15-20 min in CI), retry logic implemented |
Issue: Tests failing with timeout
- Solution: Increase timeout in
playwright.config.tsor usetest.slow()
Issue: Browser not launching
- Solution: Run
npx playwright install --with-deps
Issue: Tests pass locally but fail in CI
- Solution: Check for timing issues, use proper waits instead of hard sleeps
- Retry logic has been implemented to handle CI flakiness
Issue: Element not found
- Solution: Verify locators are correct, check if page structure changed
Issue: WebKit not opening new tabs
- Solution: Retry logic implemented with 3 attempts and exponential backoff
-
Automatic Retry Mechanism
- Addresses WebKit flakiness in CI
- Exponential backoff strategy (1s, 2s, 3s)
- Supports both new tab and navigation operations
-
Automatic Cookie Consent Handling
- Prevents test interruptions
- Automatically dismisses before each operation
-
Language Context Preservation
- Tracks language state across navigation
- Validates language-specific behaviors
-
Full Type Safety
- TypeScript types for all methods and properties
- Compile-time error detection
-
Comprehensive Error Logging
- Detailed error messages
- Debug support with screenshots and videos
Jerome Nicholaz
Tier IV, Inc. Recruitment Assessment Submission
Project Completion Date: October 25, 2025
Repository Tag: DONE
Status: Complete - All tests have passed in CI
Thank you to Tier IV for the opportunity to work on this assessment. Special thanks to the Playwright documentation and TypeScript team & community for their excellent resources and support.