# Where to Find Jenkins Test Files: Complete Guide to the jenkinsci/jenkins Repository

> Locate Jenkins test files easily within the jenkinsci/jenkins repository. Discover how module directories and core test locations streamline your search for Jenkins test files.

- Repository: [Jenkins/jenkins](https://github.com/jenkinsci/jenkins)
- Tags: how-to-guide
- Published: 2026-08-01

---

**Jenkins test files are distributed across module-specific `src/test/java` and `src/test/resources` directories, with core tests in `core/src/test/java`, war tests in `war/src/test/java`, and integration resources in `test/src/test/resources`.**

The jenkinsci/jenkins repository organizes its comprehensive test suite across multiple Maven modules. Whether you are debugging a failure, contributing a new feature, or exploring the codebase, understanding where Jenkins test files live is essential for effective development.

## Core Test Directory Structure

Jenkins separates its test suites by component, following standard Maven conventions. Each module contains production code under `src/main` and corresponding tests under `src/test`.

### Core Unit and Integration Tests

The foundational test suite for Jenkins core resides in the `core` module. These tests cover security, monitoring, UI symbols, and internal utilities.

- **Java test classes**: `core/src/test/java` contains test classes validating core functionality
- **Test fixtures**: `core/src/test/resources` holds XML configurations, YAML data, and mock objects used by core tests

### War Executable Tests

Tests that validate the web application archive (WAR) distribution are located in the `war` module. These functional tests launch a temporary Jenkins instance to verify the built application behaves correctly.

- **Test location**: `war/src/test/java` houses executable tests that spin up a minimal Jenkins server

### CLI Tests

Command-line interface functionality is tested separately in the `cli` module. These tests verify protocol handling and client operations.

- **Test location**: `cli/src/test/java` contains tests for the Jenkins command-line client

### Plugin Test Resources

The dedicated `test` module provides harnesses and fixtures for plugin-specific integration testing.

- **Test harnesses**: `test/src/test/java` contains generic integration tests and UI automation
- **Resource fixtures**: `test/src/test/resources` stores sample plugin packages, update-center JSON files, and Groovy script fixtures used across the test suite

## How to Run Jenkins Tests Locally

The root [`pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/pom.xml) orchestrates test execution using Maven. You can execute the entire suite or target specific modules.

Clone the repository and run all tests:

```bash
git clone https://github.com/jenkinsci/jenkins.git
cd jenkins
mvn clean test

```

Run only the core unit tests:

```bash
cd core
mvn test

```

Execute war-specific functional tests:

```bash
cd war
mvn test

```

## Build Configuration

The top-level [`pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/pom.xml) aggregates all modules and configures the Maven Surefire plugin to execute tests discovered under each module's `src/test/java` directory. According to the jenkinsci/jenkins source code, this standard layout ensures consistent test discovery across core, war, cli, and plugin test components.

## Summary

- **Core tests** reside in `core/src/test/java` with resources in `core/src/test/resources`
- **War tests** are located in `war/src/test/java` and launch temporary Jenkins instances
- **CLI tests** exist in `cli/src/test/java` for command-line client validation
- **Plugin integration tests** use `test/src/test/java` and `test/src/test/resources` for harnesses and fixtures
- Execute all tests with `mvn test` from the repository root, or target specific modules by running `mvn test` within individual directories

## Frequently Asked Questions

### Where are Jenkins core unit tests located?

Core unit tests are located in `core/src/test/java` according to the jenkinsci/jenkins source code structure. This directory contains Java test classes covering security, monitoring, and internal utilities, while supporting fixtures reside in `core/src/test/resources`.

### How do I run only the Jenkins war tests?

Navigate to the `war` directory and execute `mvn test`. This command runs the executable tests in `war/src/test/java` that validate the web application by starting a temporary Jenkins instance.

### What build tool manages Jenkins test execution?

The jenkinsci/jenkins repository uses Maven to orchestrate test execution. The root [`pom.xml`](https://github.com/jenkinsci/jenkins/blob/main/pom.xml) configures the build lifecycle to automatically discover and run tests from each module's `src/test/java` directory when you execute `mvn test`.

### Where are Jenkins plugin integration test fixtures stored?

Plugin integration test fixtures, including sample plugin packages and update-center JSON files, are stored in `test/src/test/resources`. This directory supports the generic test harnesses located in `test/src/test/java` used for plugin-related validation.