Skip to content
SDETRole
SDETRole

Learning path 02 · Beginner → Intermediate

Programming for Testers

Programming fundamentals taught through test-automation examples. Learn variables, control flow, data structures, OOP, exceptions and async code in JavaScript/TypeScript, with Java and Python equivalents.

Start the path

0/9 lessons completed

What you will be able to do

  • Read and write variables, conditions, loops and functions in JavaScript, with Java and Python equivalents
  • Type API responses, page objects and test data in TypeScript so the compiler catches mistakes
  • Pick the right data structure (array, map, set, object, queue) for test data and results
  • Design page objects and API clients with encapsulation and composition instead of deep inheritance
  • Handle and rethrow exceptions without hiding real test failures
  • Explain the event loop and use promises and async/await correctly in automation code

Prerequisites

  • Comfort with basic testing concepts (see Software Testing Fundamentals)
  • A code editor such as VS Code and Node.js installed for the JavaScript examples

Who this path is for

Manual testers starting automation, and automation engineers who learnt a framework before the language underneath it. Useful preparation for SDET coding rounds.

Syllabus: 9 lessons

  1. 01 Programming Fundamentals for Testers Variables, types, conditions, loops, functions and collections, taught through test-automation examples in JavaScript with Java and Python equivalents.
  2. 02 JavaScript Essentials The JavaScript that test automation actually uses: destructuring, spread, modules, closures, error handling and, above all, promises and async/await.
  3. 03 TypeScript for Testers Types, interfaces, unions, generics and narrowing for test code: type your API responses, page objects and test data so the compiler catches mistakes first.
  4. 04 Data Structures You Will Use Arrays, maps, sets, objects, queues and nested JSON in test automation code, with JavaScript/TypeScript examples and Java and Python equivalents, plus when each one is the right choice.
  5. 05 OOP for Test Automation Classes, encapsulation, inheritance, polymorphism and abstraction explained through page objects, API clients and drivers, with TypeScript and Java examples and when to prefer composition.
  6. 06 Exception Handling How exceptions work in JavaScript/TypeScript, Java and Python, the exceptions automation code meets most, and the rules for catching, rethrowing and testing error paths without hiding failures.
  7. 07 Async Programming: Promises and async/await How the event loop, promises and async/await really work, the async bugs that make automation flaky, and patterns for parallel work, timeouts and polling in Playwright and Node.
  8. 08 Java for Testers The Java 21 you need for Selenium, REST Assured, JUnit 5 and TestNG: project layout, types, strings, collections, streams, records, exceptions and a first data-driven test.
  9. 09 Python for Testers Python 3.12 for test automation: virtual environments, core syntax, comprehensions, dataclasses and type hints, then pytest fixtures, parametrisation and markers, plus Playwright for Python.

Why testers need a programming path of their own

General programming courses spend weeks on topics automation rarely uses and skip the ones that break test suites. This path teaches the language features that matter in test code: data transformation, error handling, classes for page objects and, above all, asynchronous code. Every example is a testing task, such as filtering failed results, building a request payload or waiting for a response.

JavaScript and TypeScript are the main thread because they are the default for Playwright and Cypress. Java for Testers and Python for Testers cover the same ideas for Selenium, REST Assured and pytest teams.

How the lessons build on each other

Practise with code that is actually executed

The JavaScript coding challenges run your solution against real unit tests in a sandboxed Web Worker in your browser, so you get a genuine pass or fail. Start with chunk an array and group by a key after the data structures lesson, then attempt retry a flaky async call and implement Promise.all after the async lesson. These mirror the problems SDET coding rounds tend to set: small, practical and focused on correctness with async code.

Interviewers also watch how you work: naming, handling empty and null input, and explaining the cost of your loops. Say these things out loud while you practise, because silent correct code often scores lower than a clearly reasoned answer with a small bug.

A common mistake is calling await inside forEach and expecting the loop to wait. The event loop ordering challenge and the JavaScript async article show why it does not.

Suggested study plan

Allow three to five weeks if you are new to programming. Write every example yourself rather than copying it, and solve at least one challenge per lesson. If you already code, go straight to TypeScript, OOP and async, then test yourself with the JavaScript interview questions.

Type to search across SDETRole.

Full-text search by Pagefind · runs in your browser Open search page →