Where Are Unit Tests Located in IPED? Complete Maven Structure Guide

IPED unit tests are located in standard Maven src/test/java directories within each module, with the main parser tests found at iped-parsers/iped-parsers-impl/src/test/java and engine tests at iped-engine/src/test/java.

The IPED digital forensics framework organizes its Java source code and validation suites following standard Maven multi-module conventions. Each submodule maintains its own mirrored test tree under src/test/java, while shared test assets reside in src/test/resources, ensuring thorough isolation between production code and validation logic.

Directory Structure of IPED Unit Tests

The project segregates production code and test code according to Apache Maven standards, with each major component containing its own validation suite.

Parser Implementation Tests

The majority of extraction logic is validated in the parsers implementation module. According to the IPED source code, the root directory for these tests is:


iped-parsers/iped-parsers-impl/src/test/java

This path mirrors the iped/parsers/... package structure. For example, the Windows 10 WinX timeline parser is exercised by WinXTimelineParserTest.java, located at:


iped-parsers/iped-parsers-impl/src/test/java/iped/parsers/winx/WinXTimelineParserTest.java

Engine Core Tests

Core engine utilities—including regular expression validators, jumplist converters, and UFED model handlers—are tested within the engine module at:


iped-engine/src/test/java

A concrete example is the Swift banking code validator, which is tested in SwiftCodeServiceTest.java under iped-engine/src/test/java/iped/engine/task/regex/validator/swift/.

Test Resources and Assets

Non-Java files required for testing, such as sample chat exports and Python parser scripts, are stored under:


iped-parsers/iped-parsers-impl/src/test/resources

Python parser examples used during validation reside at iped-parsers/iped-parsers-impl/src/test/resources/test-files/python-parsers-test/PythonParserExample.py.

How Tests Are Organized

IPED follows strict naming conventions and package alignment to maintain a scalable test suite across forensic parsers.

Java Test Class Conventions

Each test class follows the JUnit pattern <Feature>Test.java and lives in the exact same package as the class it validates. This allows the WhatsAppParser implementation to be tested by WhatsAppParserTest within the iped.parsers.whatsapp package.

Parser-Specific Test Suites

Tests for individual data sources are grouped into logical sub-packages. The WhatsApp chat parser, SQLite handlers, and VLC metadata extractors each have dedicated directories under iped/parsers/, enabling focused execution of specific validation subsets.

Engine Validation Tests

Beyond parsers, the engine module contains validators for banking codes and forensic artifacts. The SwiftCodeServiceTest validates SWIFT/BIC regex patterns, while jumplist and UFED handlers have corresponding test classes in iped-engine/src/test/java/.

Running IPED Unit Tests

All tests are compiled and executed via Maven commands defined in the root pom.xml.

Execute the complete unit test suite across all modules:

mvn test

To run tests for a specific submodule only, navigate to that directory:

cd iped-parsers/iped-parsers-impl
mvn test

Run a single test class by name:

mvn -Dtest=WhatsAppParserTest test

Example Test Implementations

Java Parser Test Example

The WhatsApp parser test demonstrates how IPED loads sample resources and asserts parsing results:

package iped.parsers.whatsapp;

import org.junit.Test;
import static org.junit.Assert.*;

public class WhatsAppParserTest {

    @Test
    public void testParseSimpleChat() throws Exception {
        // Load a sample WhatsApp chat export (resource file)
        Path sample = Paths.get(
            getClass().getResource("/whatsapp/sample_chat.txt").toURI());

        WhatsAppParser parser = new WhatsAppParser();
        List<Message> msgs = parser.parse(sample);

        assertEquals(5, msgs.size());
        assertEquals("John", msgs.get(0).getAuthor());
        // … more assertions …
    }
}

Source: iped-parsers/iped-parsers-impl/src/test/java/iped/parsers/whatsapp/WhatsAppParserTest.java

Python Parser Resource Example

Some tests validate Python-based parsers using sample scripts stored as test resources:


# iped/parsers/python-parsers-test/PythonParserExample.py

def add(a, b):
    return a + b

assert add(2, 3) == 5

Source: iped-parsers/iped-parsers-impl/src/test/resources/test-files/python-parsers-test/PythonParserExample.py

Summary

  • IPED unit tests follow the standard Maven src/test/java directory structure across all submodules.
  • Parser tests are centralized in iped-parsers/iped-parsers-impl/src/test/java, organized by forensic data type (e.g., iped/parsers/whatsapp, iped/parsers/winx).
  • Engine tests reside in iped-engine/src/test/java and cover validators, jumplists, and UFED handlers.
  • Test resources including Python scripts and sample data files are stored under src/test/resources within the relevant module.
  • Execution is handled via Maven (mvn test), with support for single-test or single-module runs using standard Maven parameters.

Frequently Asked Questions

Where are the WhatsApp parser tests located in IPED?

The WhatsApp chat parser tests are located at iped-parsers/iped-parsers-impl/src/test/java/iped/parsers/whatsapp/WhatsAppParserTest.java. This class resides in the same package as the parser implementation and validates chat export parsing using sample resource files loaded from the test classpath.

How do I run only the parser tests in IPED?

Navigate to the parser implementation module and execute Maven: cd iped-parsers/iped-parsers-impl && mvn test. Alternatively, from the root directory, use mvn -Dtest=WhatsAppParserTest test (replacing the class name as needed) to run a specific test class without executing the entire suite.

Are there Python-specific tests in IPED?

Yes. While the test logic is written in Java, Python parser validation relies on sample scripts stored as test resources. Example files like PythonParserExample.py are located at iped-parsers/iped-parsers-impl/src/test/resources/test-files/python-parsers-test/ and are referenced by Java test classes during execution to verify Python script integration.

What testing framework does IPED use?

IPED uses JUnit for its unit testing framework, as evidenced by the @Test annotations and assertion patterns found in classes like WinXTimelineParserTest and SwiftCodeServiceTest. All tests are compiled and executed through the Maven build system defined in the root pom.xml.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →