Back to Articles
OnboardingBeginner

Development Environment Setup for QE Engineers

Step-by-step guide to setting up your local development environment for testing

23 min read
...
onboardingsetupdevelopmentenvironmenttools
Banner for Development Environment Setup for QE Engineers

Introduction

Welcome to your journey as a Quality Engineer! Setting up a proper development environment is your first critical step toward productivity and success. Think of this as building your testing workshop—each tool serves a specific purpose, and when properly configured, they work together seamlessly to help you deliver quality software.

Why This Matters

A well-configured environment means you can start writing tests immediately, debug issues faster, and collaborate effectively with your team. Don't skip steps—your future self will thank you!

What You'll Learn

This comprehensive guide covers everything you need to set up your QE development environment:

  • Core development tools (IDE, JDK, build tools, Git)
  • Testing frameworks and browser automation
  • API testing and database tools
  • Docker and containerization
  • Environment configuration and troubleshooting

Prerequisites

Before you begin, ensure you have:

  • Administrator/sudo access to your computer
  • Stable internet connection for downloads
  • Basic command-line familiarity (we'll guide you through commands)
  • Approximately 2-3 hours to complete the full setup

Essential Tools Checklist

Here's your complete toolkit for QE work:

ToolPurposePriorityEst. TimePlatforms
GitVersion controlCritical5 minAll
Java JDK 11/17Test automationCritical10 minAll
Maven/GradleBuild automationCritical5 minAll
IntelliJ/VS CodeCode editingCritical15 minAll
Chrome + DriversBrowser testingCritical10 minAll
PostmanAPI testingHigh5 minAll
Docker DesktopContainerizationHigh15 minAll
DBeaverDatabase clientMedium10 minAll
Node.jsJS toolingMedium10 minAll

Installation Order Matters

Follow the order below—some tools depend on others being installed first (e.g., Maven needs Java).

Core Development Tools

1. IDE/Code Editors

Your IDE is your primary workspace. Choose based on your needs:

Why IntelliJ?

  • Superior Java support and debugging
  • Built-in Maven/Gradle integration
  • Excellent code completion and refactoring
  • Native Git integration

Installation:

# macOS (using Homebrew)
brew install --cask intellij-idea-ce
 
# Windows (using Chocolatey)
choco install intellijidea-community
 
# Linux (Ubuntu/Debian)
sudo snap install intellij-idea-community --classic

Essential Plugins:

After installing IntelliJ, add these plugins:

  1. Go to File → Settings → Plugins (or IntelliJ IDEA → Preferences → Plugins on macOS)
  2. Search and install:
    • TestNG - For TestNG test execution
    • Cucumber for Java - BDD testing support
    • Maven Helper - Better Maven dependency management
    • SonarLint - Code quality checks
    • Rainbow Brackets - Better code readability
    • Git Toolbox - Enhanced Git features

Option B: Visual Studio Code

Why VS Code?

  • Lightweight and fast
  • Great for multi-language projects
  • Extensive extension marketplace
  • Excellent for JavaScript/TypeScript testing

Installation:

# macOS
brew install --cask visual-studio-code
 
# Windows
choco install vscode
 
# Linux
sudo snap install code --classic

Essential Extensions:

  1. Java Extension Pack - Complete Java support
  2. Debugger for Java - Debugging capabilities
  3. Test Runner for Java - Run and debug tests
  4. REST Client - API testing in VS Code
  5. GitLens - Enhanced Git integration
  6. ESLint - JavaScript linting
  7. Prettier - Code formatting

Code Formatting Setup

Consistent code formatting is crucial for team collaboration:

IntelliJ:

  1. File → Settings → Editor → Code Style
  2. Set scheme to Default or import team's code style XML
  3. Enable: Reformat code on save
  4. Enable: Optimize imports on save

Keyboard Shortcuts to Master:

IntelliJ:

  • Cmd/Ctrl + Shift + F - Format code
  • Cmd/Ctrl + Alt + L - Reformat file
  • Cmd/Ctrl + Shift + T - Navigate to test
  • Ctrl + Shift + R - Run current test
  • Shift + F10 - Run last configuration

2. Java Development Kit (JDK)

Java is the foundation for most enterprise test automation frameworks.

Choosing a Version

JDK Version Recommendation

  • JDK 17 - Current LTS, recommended for new projects
  • JDK 11 - Older LTS, still widely used
  • JDK 21 - Latest LTS (2023), adopt if your team uses it

Installation (JDK 17)

# macOS (using Homebrew)
brew install openjdk@17
 
# Add to PATH (add to ~/.zshrc or ~/.bash_profile)
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
export JAVA_HOME="/opt/homebrew/opt/openjdk@17"
 
# Windows (using Chocolatey)
choco install openjdk17
 
# Linux (Ubuntu/Debian)
sudo apt update
sudo apt install openjdk-17-jdk openjdk-17-jre

Setting JAVA_HOME

macOS/Linux:

# Add to ~/.zshrc or ~/.bash_profile
export JAVA_HOME=$(/usr/libexec/java_home -v 17)  # macOS
# OR
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64  # Linux
 
# Reload your shell
source ~/.zshrc  # or source ~/.bash_profile

Windows:

  1. Open System Properties → Environment Variables
  2. Add new System Variable:
    • Name: JAVA_HOME
    • Value: C:\Program Files\Java\jdk-17 (adjust path)
  3. Edit Path variable, add: %JAVA_HOME%\bin

Verifying Installation

java -version
# Should show: openjdk version "17.0.x"
 
javac -version
# Should show: javac 17.0.x
 
echo $JAVA_HOME
# Should show your JDK path

Managing Multiple Java Versions

If you need to switch between Java versions:

Using jEnv (macOS/Linux):

# Install jEnv
brew install jenv
 
# Add to shell (add to ~/.zshrc)
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
 
# Add Java versions
jenv add /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home
 
# List versions
jenv versions
 
# Set global version
jenv global 17
 
# Set project-specific version
cd /path/to/project
jenv local 11

Using SDKMAN:

# Install SDKMAN
curl -s "https://get.sdkman.io" | bash
 
# Install Java versions
sdk install java 17.0.9-oracle
sdk install java 11.0.21-oracle
 
# List installed versions
sdk list java
 
# Switch versions
sdk use java 17.0.9-oracle
sdk default java 17.0.9-oracle

3. Build Tools

Build tools manage dependencies, compile code, and run tests.

Maven

Most enterprise Java projects use Maven.

Installation:

# macOS
brew install maven
 
# Windows
choco install maven
 
# Linux (Ubuntu/Debian)
sudo apt install maven

Verify Installation:

mvn -version
# Should show Maven version, Java version, and OS info

Understanding pom.xml:

The pom.xml file defines your project structure and dependencies:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
    <modelVersion>4.0.0</modelVersion>
    
    <groupId>com.company.qa</groupId>
    <artifactId>test-automation</artifactId>
    <version>1.0-SNAPSHOT</version>
    
    <dependencies>
        <!-- Selenium WebDriver -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.16.0</version>
        </dependency>
        
        <!-- TestNG -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.8.0</version>
        </dependency>
    </dependencies>
</project>

Essential Maven Commands:

# Clean and install dependencies
mvn clean install
 
# Run tests
mvn test
 
# Run specific test
mvn test -Dtest=YourTestClass
 
# Skip tests during build
mvn clean install -DskipTests
 
# Update dependencies
mvn clean install -U
 
# Show dependency tree
mvn dependency:tree

Gradle (Alternative)

Some projects use Gradle instead of Maven.

Installation:

# macOS
brew install gradle
 
# Windows
choco install gradle
 
# Linux
sudo apt install gradle

Basic build.gradle:

plugins {
    id 'java'
}
 
group = 'com.company.qa'
version = '1.0-SNAPSHOT'
 
repositories {
    mavenCentral()
}
 
dependencies {
    testImplementation 'org.seleniumhq.selenium:selenium-java:4.16.0'
    testImplementation 'org.testng:testng:7.8.0'
}
 
test {
    useTestNG()
}

Essential Gradle Commands:

# Build project
./gradlew build
 
# Run tests
./gradlew test
 
# Clean build
./gradlew clean build

4. Version Control (Git)

Git is essential for code collaboration and version management.

Installation

# macOS
brew install git
 
# Windows
choco install git
 
# Linux (Ubuntu/Debian)
sudo apt install git

Verify Installation:

git --version
# Should show: git version 2.x.x

Git Configuration

Set up your identity:

# Global configuration
git config --global user.name "Your Name"
git config --global user.email "your.email@company.com"
 
# Set default branch name
git config --global init.defaultBranch main
 
# Enable color output
git config --global color.ui auto
 
# Set default editor
git config --global core.editor "code --wait"  # VS Code
# OR
git config --global core.editor "idea --wait"  # IntelliJ
 
# View configuration
git config --list

SSH Key Setup for GitHub

SSH keys allow secure authentication without passwords:

Generate SSH Key:

# Generate new SSH key (use your GitHub email)
ssh-keygen -t ed25519 -C "your.email@company.com"
 
# When prompted, press Enter for default location
# Enter a passphrase (recommended) or leave empty
 
# Start SSH agent
eval "$(ssh-agent -s)"
 
# Add key to SSH agent (macOS)
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
 
# Add key to SSH agent (Linux/Windows Git Bash)
ssh-add ~/.ssh/id_ed25519

Add to GitHub:

# Copy public key to clipboard
# macOS
pbcopy < ~/.ssh/id_ed25519.pub
 
# Linux (requires xclip)
xclip -selection clipboard < ~/.ssh/id_ed25519.pub
 
# Windows (Git Bash)
cat ~/.ssh/id_ed25519.pub | clip

Then:

  1. Go to GitHub → Settings → SSH and GPG keys
  2. Click New SSH key
  3. Paste your key and save

Test Connection:

ssh -T git@github.com
# Should see: "Hi username! You've successfully authenticated..."

Git Aliases for QE Workflow

Add these to ~/.gitconfig for productivity:

[alias]
    st = status
    co = checkout
    br = branch
    ci = commit
    unstage = reset HEAD --
    last = log -1 HEAD
    visual = log --oneline --graph --all --decorate
    amend = commit --amend --no-edit
    undo = reset --soft HEAD^

Usage:

git st              # Instead of git status
git co -b feature   # Instead of git checkout -b feature
git visual          # See branch history

Essential Git Commands Reference

# Clone repository
git clone git@github.com:company/repo.git
 
# Create and switch to new branch
git checkout -b feature/my-test
 
# Stage files
git add .                    # All files
git add src/test/MyTest.java # Specific file
 
# Commit changes
git commit -m "Add login test"
 
# Push to remote
git push origin feature/my-test
 
# Pull latest changes
git pull origin main
 
# View changes
git status                  # Changed files
git diff                    # Unstaged changes
git diff --staged           # Staged changes
git --no-pager log --oneline -10  # Last 10 commits
 
# Stash changes
git stash                   # Save changes temporarily
git stash pop               # Restore stashed changes
git stash list              # View all stashes
 
# Discard changes
git checkout -- filename    # Discard file changes
 
# WARNING: Permanently destroys ALL uncommitted changes!
git reset --hard            # DANGER: No recovery possible!

Testing Tools & Frameworks

1. Browser Drivers

Selenium WebDriver needs browser drivers to control browsers.

Automatically downloads and manages drivers for you.

Add to Maven pom.xml:

<!-- Check Maven Central for latest version: https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
<dependency>
    <groupId>io.github.bonigarcia</groupId>
    <artifactId>webdrivermanager</artifactId>
    <version>5.6.2</version>
</dependency>

Usage in Tests:

import io.github.bonigarcia.wdm.WebDriverManager;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
 
public class MyTest {
    @BeforeMethod
    public void setup() {
        // Automatically handles driver download and setup
        WebDriverManager.chromedriver().setup();
        WebDriver driver = new ChromeDriver();
    }
}

Option B: Manual Driver Installation

If you prefer manual control:

ChromeDriver:

# macOS
brew install --cask chromedriver
 
# Windows
choco install chromedriver
 
# Verify
chromedriver --version

GeckoDriver (Firefox):

# macOS
brew install geckodriver
 
# Windows
choco install selenium-gecko-driver
 
# Verify
geckodriver --version

Browser DevTools Setup

Learn to use browser DevTools for debugging:

Chrome DevTools:

  • Open: F12 or Cmd/Ctrl + Shift + I
  • Inspect element: Cmd/Ctrl + Shift + C
  • Network tab: Monitor API calls
  • Console: Debug JavaScript
  • Elements: Find CSS selectors

2. API Testing Tools

Postman

Essential for API exploration and testing.

Installation:

Download from postman.com/downloads

Or via package manager:

# macOS
brew install --cask postman
 
# Windows
choco install postman
 
# Linux
snap install postman

Setup:

  1. Create Account - Free tier is sufficient
  2. Create Workspace - Organize your collections
  3. Import Collections - Import team's API collections
  4. Set Up Environments - Configure different environments

Basic Environment Setup:

Create environments for different stages:

// DEV Environment
{
  "baseUrl": "https://api-dev.company.com",
  "apiKey": "dev-api-key-123",
  "timeout": 5000
}
 
// QA Environment
{
  "baseUrl": "https://api-qa.company.com",
  "apiKey": "qa-api-key-456",
  "timeout": 5000
}

Newman (CLI Runner):

Run Postman collections from command line:

# Install Newman
npm install -g newman
 
# Run collection
newman run collection.json -e environment.json
 
# With reporters
newman run collection.json -e environment.json \
  --reporters cli,html \
  --reporter-html-export results.html

RestAssured

Java library for API testing in code.

Add to pom.xml:

<dependency>
    <groupId>io.rest-assured</groupId>
    <artifactId>rest-assured</artifactId>
    <version>5.4.0</version>
    <scope>test</scope>
</dependency>

Basic API Test Example:

import io.restassured.RestAssured;
import org.testng.annotations.Test;
 
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;
 
public class ApiTest {
    @Test
    public void testGetUser() {
        RestAssured.baseURI = "https://api.company.com";
        
        given()
            .header("Authorization", "Bearer token")
            .when()
            .get("/users/1")
            .then()
            .statusCode(200)
            .body("name", notNullValue())
            .body("email", containsString("@"));
    }
}

3. Database Tools

DBeaver (Universal Database Client)

Supports MySQL, PostgreSQL, Oracle, SQL Server, and more.

Installation:

# macOS
brew install --cask dbeaver-community
 
# Windows
choco install dbeaver
 
# Linux
sudo snap install dbeaver-ce

Setting Up a Connection:

  1. New Database Connection → Select database type
  2. Enter Connection Details:
    • Host: localhost or remote host
    • Port: 3306 (MySQL), 5432 (PostgreSQL)
    • Database: testdb
    • Username/Password: From your team
  3. Test Connection → Save

Common SQL Queries for Test Data:

-- View test users
SELECT * FROM users WHERE email LIKE '%test%';
 
-- Create test data
INSERT INTO users (name, email, created_at) 
VALUES ('Test User', 'test@example.com', NOW());
 
-- Clean up test data
DELETE FROM orders WHERE user_id IN 
  (SELECT id FROM users WHERE email LIKE '%test%');
 
-- Check data freshness
SELECT table_name, create_time, update_time 
FROM information_schema.tables 
WHERE table_schema = 'testdb';

Alternative Database Clients

  • MySQL Workbench - Best for MySQL
  • pgAdmin - Best for PostgreSQL
  • DataGrip (JetBrains) - Paid, powerful for all databases

4. Docker & Containers

Docker allows you to run databases and services in isolated containers.

Docker Desktop Installation

macOS:

brew install --cask docker
 
# Or download from docker.com

Windows:

Download Docker Desktop from docker.com/products/docker-desktop

Linux:

# Ubuntu/Debian
sudo apt update
sudo apt install docker.io docker-compose
 
# Start Docker service
sudo systemctl start docker
sudo systemctl enable docker
 
# Add user to docker group
sudo usermod -aG docker $USER

Verify Installation:

docker --version
docker-compose --version
 
# Test Docker
docker run hello-world

Basic Docker Commands

# Pull an image
docker pull mysql:8.0
 
# Run a container
docker run -d --name test-db \
  -e MYSQL_ROOT_PASSWORD=password \
  -p 3306:3306 \
  mysql:8.0
 
# List running containers
docker ps
 
# Stop container
docker stop test-db
 
# Start container
docker start test-db
 
# Remove container
docker rm test-db
 
# View logs
docker logs test-db
 
# Execute command in container
docker exec -it test-db mysql -u root -p

Running Test Databases in Containers

MySQL:

# Note: Use strong passwords even for local development!
docker run -d \
  --name mysql-test \
  -e MYSQL_ROOT_PASSWORD=SecurePass123! \
  -e MYSQL_DATABASE=testdb \
  -p 3306:3306 \
  mysql:8.0

PostgreSQL:

# Note: Use strong passwords even for local development!
docker run -d \
  --name postgres-test \
  -e POSTGRES_PASSWORD=SecurePass123! \
  -e POSTGRES_DB=testdb \
  -p 5432:5432 \
  postgres:15

Docker Compose for Test Environments

Create docker-compose.yml:

version: '3.8'
 
services:
  mysql:
    image: mysql:8.0
    environment:
      MYSQL_ROOT_PASSWORD: SecurePass123!  # Change to a strong password!
      MYSQL_DATABASE: testdb
    ports:
      - "3306:3306"
    volumes:
      - mysql_data:/var/lib/mysql
 
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"
 
volumes:
  mysql_data:

Commands:

# Start all services
docker-compose up -d
 
# Stop all services
docker-compose down
 
# View logs
docker-compose logs -f
 
# Rebuild services
docker-compose up -d --build

Terminal & CLI Tools

Terminal Emulators

macOS:

  • iTerm2 (Recommended): brew install --cask iterm2
  • Default Terminal.app works fine

Windows:

  • Windows Terminal (Recommended): Microsoft Store or winget install Microsoft.WindowsTerminal
  • PowerShell 7: winget install Microsoft.PowerShell

Linux:

  • Default terminal is usually sufficient
  • Terminator: sudo apt install terminator

Shell Customization

Oh My Zsh (macOS/Linux)

Makes your terminal powerful and beautiful:

# Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
 
# Edit ~/.zshrc and set theme
ZSH_THEME="robbyrussell"  # or "agnoster", "powerlevel10k/powerlevel10k"
 
# Add useful plugins
plugins=(git docker mvn gradle kubectl)
 
# Apply changes
source ~/.zshrc

PowerShell Customization (Windows)

# Install Oh My Posh
winget install JanDeDobbeleer.OhMyPosh
 
# Install Terminal Icons
Install-Module -Name Terminal-Icons -Repository PSGallery
 
# Edit profile
notepad $PROFILE
 
# Add to profile:
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\agnoster.omp.json" | Invoke-Expression
Import-Module Terminal-Icons

Useful CLI Tools

# curl - Make HTTP requests
curl https://api.example.com/users
 
# jq - Parse JSON
curl https://api.example.com/users | jq '.[] | .name'
 
# httpie - User-friendly HTTP client
http GET https://api.example.com/users
 
# tree - View directory structure
tree -L 2 src/
 
# bat - Better cat with syntax highlighting
bat README.md

Install these tools:

# macOS
brew install curl jq httpie tree bat
 
# Windows (Chocolatey)
choco install curl jq httpie tree bat
 
# Linux
sudo apt install curl jq httpie tree bat

Shell Aliases for QE Tasks

Add to ~/.zshrc or ~/.bashrc:

# Git shortcuts
alias gs='git status'
alias gp='git pull'
alias gc='git commit -m'
alias gco='git checkout'
 
# Maven shortcuts
alias mci='mvn clean install'
alias mt='mvn test'
alias mts='mvn test -DskipTests'
 
# Docker shortcuts
alias dps='docker ps'
alias dcu='docker-compose up -d'
alias dcd='docker-compose down'
alias dlogs='docker-compose logs -f'
 
# Navigation
alias ll='ls -la'
alias ..='cd ..'
alias ...='cd ../..'
 
# Testing shortcuts
alias runtests='mvn clean test -Dsurefire.suiteXmlFiles=testng.xml'
alias coverage='mvn clean test jacoco:report'

Environment Variables & Configuration

Setting Up .env Files

Create a .env file in your project root:

# Database Configuration
DB_HOST=localhost
DB_PORT=3306
DB_NAME=testdb
DB_USER=testuser
DB_PASSWORD=YOUR_SECURE_PASSWORD_HERE
 
# API Configuration
API_BASE_URL=https://api-qa.company.com
API_KEY=YOUR_API_KEY_HERE
API_TIMEOUT=30000
 
# Test Configuration
BROWSER=chrome
HEADLESS=false
IMPLICIT_WAIT=10
EXPLICIT_WAIT=30
 
# Environment
ENV=qa
DEBUG=true

Managing Sensitive Data

Never Commit Secrets

Never commit .env files or credentials to Git! Always use .gitignore.

Best Practices:

  1. Use .env.example for documentation:
# .env.example (safe to commit)
DB_HOST=localhost
DB_PORT=3306
DB_NAME=your_database_name
DB_USER=your_username
DB_PASSWORD=your_password
API_KEY=your_api_key_here
  1. Add .env to .gitignore:
# .gitignore
.env
.env.local
*.key
*.pem
secrets/
credentials.json
  1. Load .env in Tests:

Using dotenv library:

<dependency>
    <groupId>io.github.cdimascio</groupId>
    <artifactId>dotenv-java</artifactId>
    <version>3.0.0</version>
</dependency>
import io.github.cdimascio.dotenv.Dotenv;
 
public class Config {
    private static final Dotenv dotenv = Dotenv.load();
    
    public static String getDbHost() {
        return dotenv.get("DB_HOST");
    }
    
    public static String getApiKey() {
        return dotenv.get("API_KEY");
    }
}

Environment-Specific Configurations

Create config files for different environments:

config/
├── application.properties          # Default
├── application-dev.properties      # Development
├── application-qa.properties       # QA
└── application-prod.properties     # Production

application-qa.properties:

# QA Environment
base.url=https://qa.company.com
api.url=https://api-qa.company.com
db.url=jdbc:mysql://qa-db.company.com:3306/testdb
timeout.implicit=10
timeout.explicit=30
browser=chrome
headless=false

Using .gitignore Properly

Complete .gitignore for test projects:

# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
 
# Gradle
.gradle/
build/
out/
 
# IDE
.idea/
*.iml
.vscode/
.settings/
.classpath
.project
 
# Test Results
test-output/
reports/
screenshots/
videos/
allure-results/
surefire-reports/
 
# Environment Files
.env
.env.local
.env.*.local
 
# Logs
*.log
logs/
 
# OS Files
.DS_Store
Thumbs.db
 
# Sensitive Data
secrets/
*.key
*.pem
credentials.json

Project Structure & Dependencies

Cloning Your Test Automation Repository

# Clone via SSH (recommended after SSH key setup)
git clone git@github.com:company/test-automation.git
 
# Or via HTTPS
git clone https://github.com/company/test-automation.git
 
# Navigate to project
cd test-automation
 
# Check current branch
git branch
 
# Switch to develop branch
git checkout develop
 
# Pull latest changes
git pull origin develop

Understanding Project Structure

Typical test automation project structure:

test-automation/
├── src/
│   ├── main/
│   │   └── java/
│   │       ├── pages/          # Page Objects
│   │       ├── utils/          # Utilities
│   │       └── config/         # Configuration
│   └── test/
│       ├── java/
│       │   ├── api/           # API Tests
│       │   ├── ui/            # UI Tests
│       │   └── integration/   # Integration Tests
│       └── resources/
│           ├── testdata/      # Test Data
│           ├── testng.xml     # TestNG Suite
│           └── config/        # Properties Files
├── pom.xml                    # Maven Dependencies
├── .gitignore
├── README.md
└── docker-compose.yml

Installing Project Dependencies

For Maven Projects:

# Clean and install all dependencies
mvn clean install
 
# Skip tests during installation
mvn clean install -DskipTests
 
# Update all dependencies
mvn clean install -U
 
# Install specific dependency
mvn dependency:get -Dartifact=groupId:artifactId:version

For Gradle Projects:

# Install dependencies
./gradlew build
 
# Skip tests
./gradlew build -x test
 
# Refresh dependencies
./gradlew build --refresh-dependencies

For Node.js Projects:

# Install dependencies
npm install
 
# Or using Yarn
yarn install

Running Your First Test Locally

Run Sample Test:

# Maven - Run all tests
mvn test
 
# Maven - Run specific test class
mvn test -Dtest=LoginTest
 
# Maven - Run specific test method
mvn test -Dtest=LoginTest#testValidLogin
 
# Maven - Run with TestNG XML
mvn test -Dsurefire.suiteXmlFiles=testng.xml
 
# Gradle - Run all tests
./gradlew test
 
# Gradle - Run specific test
./gradlew test --tests LoginTest

Simple Test to Verify Setup:

Create src/test/java/EnvironmentVerificationTest.java:

import org.testng.annotations.Test;
import static org.testng.Assert.*;
 
public class EnvironmentVerificationTest {
    
    @Test
    public void verifyJavaVersion() {
        String javaVersion = System.getProperty("java.version");
        System.out.println("Java Version: " + javaVersion);
        assertNotNull(javaVersion, "Java version should be set");
        assertTrue(javaVersion.startsWith("17") || javaVersion.startsWith("11") || javaVersion.startsWith("21"), 
            "Java 11, 17, or 21 required");
    }
    
    @Test
    public void verifyMavenHome() {
        String mavenHome = System.getenv("MAVEN_HOME");
        System.out.println("Maven Home: " + mavenHome);
        // Maven Home might not always be set, so just log it
    }
    
    @Test
    public void verifySystemProperties() {
        System.out.println("OS Name: " + System.getProperty("os.name"));
        System.out.println("OS Version: " + System.getProperty("os.version"));
        System.out.println("User Home: " + System.getProperty("user.home"));
        System.out.println("User Dir: " + System.getProperty("user.dir"));
        assertTrue(true, "Environment setup verified!");
    }
}

Run it:

mvn test -Dtest=EnvironmentVerificationTest

Troubleshooting Common Issues

JDK Version Mismatches

Problem: Tests fail with UnsupportedClassVersionError

Solution:

# Check Java version
java -version
 
# Check what your project requires (look in pom.xml)
grep -A2 "maven.compiler" pom.xml
 
# Switch Java version using jEnv
jenv local 17
 
# Or using SDKMAN
sdk use java 17.0.9-oracle

Maven/Gradle Dependency Conflicts

Problem: NoClassDefFoundError or version conflicts

Solution:

# Maven - Show dependency tree
mvn dependency:tree
 
# Find specific dependency
mvn dependency:tree | grep selenium
 
# Clear local repository cache (LAST RESORT - will re-download all dependencies!)
# This can take significant time and bandwidth
rm -rf ~/.m2/repository
mvn clean install
 
# Resolve conflicts by excluding transitive dependencies
# In pom.xml:
<dependency>
    <groupId>some.group</groupId>
    <artifactId>some-artifact</artifactId>
    <exclusions>
        <exclusion>
            <groupId>conflicting.group</groupId>
            <artifactId>conflicting-artifact</artifactId>
        </exclusion>
    </exclusions>
</dependency>
 
# Force update dependencies
mvn clean install -U

Browser Driver Compatibility Issues

Problem: SessionNotCreatedException - driver version doesn't match browser

Solution:

# Check Chrome version
google-chrome --version  # Linux
# Or check in browser: chrome://version
 
# Option 1: Use WebDriverManager (automatic)
WebDriverManager.chromedriver().setup();
 
# Option 2: Update driver manually
brew upgrade chromedriver  # macOS
 
# Option 3: Specify driver version
WebDriverManager.chromedriver().driverVersion("120.0.6099.109").setup();

Network/Proxy Configuration

Problem: Cannot download dependencies or access external resources

Solution:

Maven Proxy (edit ~/.m2/settings.xml):

<settings>
    <proxies>
        <proxy>
            <id>company-proxy</id>
            <active>true</active>
            <protocol>http</protocol>
            <host>proxy.company.com</host>
            <port>8080</port>
            <username>your-username</username>
            <password>your-password</password>
            <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
        </proxy>
    </proxies>
</settings>

Git Proxy:

Security Note

Avoid storing credentials in plaintext. Use credential managers or environment variables when possible.

# Without credentials in URL (recommended)
git config --global http.proxy http://proxy.company.com:8080
 
# With credentials (use environment variables or credential manager instead)
# git config --global http.proxy http://username:password@proxy.company.com:8080
 
# Remove proxy
git config --global --unset http.proxy
git config --global --unset https.proxy

npm Proxy:

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
 
# Remove proxy
npm config delete proxy
npm config delete https-proxy

SSL Certificate Issues

Problem: SSLHandshakeException or certificate errors

Solution:

For Maven:

# Download certificate
openssl s_client -connect repo.maven.apache.org:443 -showcerts
 
# Import to Java keystore
sudo keytool -import -alias maven -file maven.cer \
  -keystore $JAVA_HOME/lib/security/cacerts \
  -storepass changeit

For Git:

Security Warning

Never disable SSL verification globally! This makes you vulnerable to man-in-the-middle attacks.

# Option 1: Use specific certificate (recommended)
git config --global http.sslCAInfo /path/to/certificate.crt
 
# Option 2: Disable SSL for specific repo only (temporary, last resort)
cd /path/to/repo
git config http.sslVerify false
# Remember to re-enable: git config --unset http.sslVerify

Permission Denied Errors

Problem: Cannot execute scripts or install packages

Solution:

# macOS/Linux - Make script executable
chmod +x script.sh
 
# macOS/Linux - Use sudo for system-wide installs
sudo apt install package-name
 
# Fix npm permissions (avoid sudo)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
# Add to ~/.bashrc or ~/.zshrc:
export PATH=~/.npm-global/bin:$PATH
 
# Docker permission (Linux)
sudo usermod -aG docker $USER
# Log out and log back in

Port Already in Use

Problem: Cannot start application - port 8080 already in use

Solution:

# Find process using port (macOS/Linux)
lsof -i :8080
 
# Kill process
kill -9 <PID>
 
# Windows
netstat -ano | findstr :8080
taskkill /PID <PID> /F
 
# Docker - stop conflicting container
docker ps
docker stop <container-id>

Verification Checklist

Use this checklist to verify your setup is complete:

Core Tools

  • JDK installed and JAVA_HOME set

    java -version  # Should show JDK 11, 17, or 21
    echo $JAVA_HOME  # Should show JDK path
  • Maven/Gradle working

    mvn -version  # Should show Maven version
    mvn clean install -DskipTests  # Should complete successfully
  • Git configured with SSH keys

    git config --list  # Should show your name and email
    ssh -T git@github.com  # Should authenticate successfully
  • IDE installed with required plugins

    • IntelliJ/VS Code installed
    • Java/TestNG plugins active
    • Can open and navigate project

Testing Tools

  • Can run tests locally

    mvn test  # Should execute tests
  • Browser drivers working

    WebDriverManager.chromedriver().setup();
    WebDriver driver = new ChromeDriver();  // Should open browser
  • Postman installed and configured

    • Can make API requests
    • Team collections imported
  • Database connections working

    • DBeaver connected to test DB
    • Can execute queries
  • Docker running

    docker run hello-world  # Should complete successfully
  • Node.js and npm installed

    node -version && npm -version
  • Terminal customized

    • Oh My Zsh or PowerShell enhancements
    • Useful aliases configured

Project-Specific

  • Test repository cloned
  • Dependencies installed
  • Tests run successfully
  • Can create and push a branch
  • Connected to team channels (Slack/Teams)

Cross-References & Next Steps

Continue Your Journey

Now that your environment is set up, it's time to dive deeper into testing!

Advanced Topics

Once comfortable with basics, explore these:

Conclusion

Congratulations! You've set up a professional QE development environment. Remember:

You're Ready to Start Testing!

Your environment is now configured. Don't hesitate to ask your team for help with project-specific configurations.

Key Takeaways

  1. Take your time - Proper setup now saves hours later
  2. Document customizations - Help the next person (and future you!)
  3. Keep learning - Technology evolves, stay updated
  4. Ask questions - Your team wants to help you succeed

What's Next?

  1. Run your first test - Verify everything works
  2. Join team meetings - Learn about current work
  3. Read team documentation - Understand conventions
  4. Start small - Fix a test, add coverage
  5. Share your learnings - Help improve onboarding

Helpful Resources

Happy testing! 🚀

Comments (0)

Loading comments...