๐Ÿ™ Junior Tester Starter Kit

Automation for Beginners โ€” Starter Guide

โ† Back to Kit Home

Automation for Beginners โ€” Starter Guide

A friendly introduction to test automation. No prior coding experience needed to read this โ€” but you will learn some code on the way.


1. What is test automation?

Test automation means writing code that runs tests for you, instead of clicking through the app by hand.


2. When to automate (and when NOT to)

โœ… Good candidates for automation

โŒ Bad candidates (keep them manual)

๐Ÿ’ก Rule of thumb: If you will run the same test more than ~10 times, think about automating it.


3. Tool suggestions for beginners

Tool What it's for Why it's good for beginners
Playwright Web UI automation Modern, fast, great docs, auto-waits for elements
Selenium Web UI automation The classic tool, huge community, many jobs ask for it
Postman API testing No code needed to start, click-and-test
Cypress Web UI automation Nice developer experience, JavaScript only
Robot Framework Keyword-driven automation Tests read like plain English

Recommended path: Start with Postman (API, no code) โ†’ then Playwright (UI, JavaScript).


4. Example: Playwright login test (JavaScript)

This test opens a practice site, logs in, and checks that login worked.

Setup (one time)

# 1. Install Node.js from https://nodejs.org (LTS version)

# 2. Create a folder and install Playwright
mkdir my-first-automation
cd my-first-automation
npm init -y
npm install @playwright/test
npx playwright install

The test โ€” login.spec.js

// login.spec.js
const { test, expect } = require('@playwright/test');

test('user can log in with valid credentials', async ({ page }) => {
  // 1. Open the login page
  await page.goto('https://www.saucedemo.com');

  // 2. Fill in username and password
  await page.fill('#user-name', 'standard_user');
  await page.fill('#password', 'secret_sauce');

  // 3. Click the login button
  await page.click('#login-button');

  // 4. Check that we reached the products page
  await expect(page).toHaveURL(/inventory/);
  await expect(page.locator('.title')).toHaveText('Products');
});

test('locked-out user sees an error message', async ({ page }) => {
  await page.goto('https://www.saucedemo.com');

  await page.fill('#user-name', 'locked_out_user');
  await page.fill('#password', 'secret_sauce');
  await page.click('#login-button');

  // Check the error message is shown
  const error = page.locator('[data-test="error"]');
  await expect(error).toBeVisible();
  await expect(error).toContainText('locked out');
});

Run it

npx playwright test              # run all tests
npx playwright test --headed     # watch the browser while it runs
npx playwright test --ui         # interactive mode (great for learning!)

Understand the parts

๐Ÿ’ก Finding selectors: Right-click an element on the page โ†’ Inspect โ†’ the DevTools show you the HTML. Look for id, data-test, or class attributes.


5. Example: Postman API test checklist

Postman lets you test APIs without code. Free download: https://www.postman.com/downloads/

Try it with a free test API: https://reqres.in

Checklist โ€” your first API tests:

Bonus: test scripts in Postman (a little code)

In Postman's "Tests" tab you can add automatic checks:

pm.test("status code is 200", function () {
  pm.response.to.have.status(200);
});

pm.test("response has a token", function () {
  const json = pm.response.json();
  pm.expect(json.token).to.exist;
});

6. First steps plan (2 weeks)

  1. Day 1โ€“2: Install Postman. Do the API checklist above.
  2. Day 3โ€“5: Learn basic JavaScript (variables, functions) โ€” freeCodeCamp: https://www.freecodecamp.org/
  3. Day 6โ€“8: Install Playwright. Run the login example above.
  4. Day 9โ€“12: Write 3 more tests on https://www.saucedemo.com (add to cart, logout, sort products).
  5. Day 13โ€“14: Put your code on GitHub. ๐ŸŽ‰

7. Common beginner mistakes

  1. Automating everything. Start small. Automate the boring, stable tests first.
  2. Copy-pasting code without understanding it. Type it yourself, break it, fix it โ€” that's learning.
  3. Hardcoded waits (wait 5 seconds). Use smart waits โ€” Playwright waits automatically.
  4. Fragile selectors. Prefer data-test attributes over long CSS paths like div > div > div:nth-child(3).
  5. No assertions. A test that checks nothing is not a test.

Remember: Every automation engineer started as a beginner. Manual testers who learn automation are very valuable โ€” you already understand testing, now you're just teaching the computer to help you. ๐Ÿ’ช