MCPcopy Index your code
hub / github.com/anshooarora/chaintest

github.com/anshooarora/chaintest @chaintest-core-java-1.0.12

Chat with this repo
repository ↗ · DeepWiki ↗ · release chaintest-core-java-1.0.12 ↗ · + Follow
4,871 symbols 13,662 edges 169 files 14 documented · 0% updated 15mo agochaintest-core-java-1.0.12 · 2025-03-28★ 3830 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ChainTest CodeFactor Maven Central Docker Image Version

A comprehensive reporting framework supporting multiple generators - static, email & realtime, historical analytics with ChainLP.

Note: ChainTest is still in active development.

Generators

  • Simple: Dark | Light
  • Email: Sample
  • ChainLP: https://chaintest.onrender.com/

What is a ChainTest generator?

A generator is responsible for creating output files based on the test results and configuration settings. It processes templates, saves necessary resources, and generates reports in a specified format.

How to enable generators?

Only Java unit test frameworks are supported at present. Generators can be enabled via properties files located on classpath - for more information, see the supported plugins below.

Supported Test Frameworks

ChainLP

Refer the support matrix for support chaintest-core and chainlp versions.

ChainLP (Chain-Long-Playing like LP Record) is a Java (Spring) server which packs the Angular frontend and is distributed as a Docker image. ChainLP is the framework component providing historical analytics.

Docker image is available from https://hub.docker.com/r/anshooarora/chaintest.

The recommended way to run ChainLP is with docker-compose. Currently, the supported databases are listed below but most RDBMS database should work.

  • H2
  • MySQL
  • PostgreSQL

For each database, there is a separate docker-compose.yml available at chainlp/docker. H2 provides the most straight-forward way to test, but it is NOT recommended for production use.

# example
git clone https://github.com/anshooarora/chaintest.git
cd chaintest/chainlp/docker
docker compose -f docker-compose-h2.yml up
# h2
docker compose -f docker-compose-h2.yml up

# mysql
docker compose -f docker-compose-mysql.yml up

# posgres
docker compose -f docker-compose-postgres.yml up

ChainLP config

Use the host:port of the ChainLP server, include it in chaintest.properties along with the required value for chaintest.project.name.

The host:port combination is where the client (via plugin) will connect to and communicate over TCP. For more information how communication is established, look into ChainTestApiClient.

# (only the relevant bits shows below)

# chaintest configuration
chaintest.project.name=default

# generators:
## chainlp
chaintest.generator.chainlp.enabled=true
chaintest.generator.chainlp.host.url=<host:port>

Screenshots/Embeds

The chaintest-core client is the framework component that supports plugins to store embeds for each report. For example, with SimpleGenerator, the client saves all embeds relative to the report file in the resources folder.

As of chaintest-core:1.0.11 and ChainLP: 0.0.9, embeds are stored in DB by default. This can be turned off using the below property in favor of S3 via chaintest.storage.service.* (next section).

# default: true (embeds will be persisted in db)
chaintest.generator.chainlp.persist-embeds=true

AWS S3 for Screenshots/Embeds

To archive and view embeds in ChainLP from S3, the following settings are required:

# storage
chaintest.storage.service.enabled=true
# [azure-blob, aws-s3]
chaintest.storage.service=aws-s3
# s3 bucket or azure container name
chaintest.storage.service.container-name=<bucket name>

To configure communication between the client & ChainLP with S3:

  • Storage parameters need to be configured on both client-side and on ChainLP
  • The client and ChainLP both use the AWS Credential Chain to authenticate against the bucket and store/access blob data
  • For ChainLP, the secrets can be configured via <host>/settings by clicking the Secrets tab which will set these parameters as System properties and ChainLP will create a presigned URL for each embed

ChainLP creates a presigned URL which is served to the frontend with a lifetime of 24 hours.

Is Docker required for all ChainTest reports?

  • Docker is not a requirement for any of the static reports (SimpleGenerator, EmailGenerator)
  • Docker is required to host ChainLP as it is only available as a Docker image

Contributing

Contributions are welcome. Please open an issue or submit a pull request.

License

ChainTest is open-source software and licensed under Apache-2.0.

Extension points exported contracts — how you extend this code

Generator (Interface)
(no doc) [6 implementers]
core/chaintest-core-java/src/main/java/com/aventstack/chaintest/generator/Generator.java
SignedUrlResolver (Interface)
(no doc) [6 implementers]
chainlp/backend/chainlp/src/main/java/com/aventstack/chainlp/embed/SignedUrlResolver.java
StorageService (Interface)
(no doc) [2 implementers]
core/chaintest-core-java/src/main/java/com/aventstack/chaintest/storage/StorageService.java
ProjectRepository (Interface)
(no doc) [2 implementers]
chainlp/backend/chainlp/src/main/java/com/aventstack/chainlp/api/project/ProjectRepository.java
ChainTestEntity (Interface)
(no doc) [2 implementers]
core/chaintest-core-java/src/main/java/com/aventstack/chaintest/domain/ChainTestEntity.java
TestStatView (Interface)
(no doc)
chainlp/backend/chainlp/src/main/java/com/aventstack/chainlp/api/test/TestStatView.java
TestRepository (Interface)
(no doc)
chainlp/backend/chainlp/src/main/java/com/aventstack/chainlp/api/test/TestRepository.java
BuildStatsRepository (Interface)
(no doc)
chainlp/backend/chainlp/src/main/java/com/aventstack/chainlp/api/buildstats/BuildStatsRepository.java

Core symbols most depended-on inside this repo

get
called by 70
cdn/simple/chaintest-pkg.js
create
called by 61
core/chaintest-core-java/src/main/java/com/aventstack/chaintest/storage/StorageService.java
l
called by 51
core/chaintest-core-java/src/main/resources/com/aventstack/chaintest/generator/simple/chaintest-pkg.js
l
called by 51
core/chaintest-core-py/src/simple/resources/chart.umd.js
l
called by 51
cdn/simple/chaintest-pkg.js
l
called by 51
cdn/simple/version/chaintest-pkg.js
set
called by 50
cdn/simple/chaintest-pkg.js
s
called by 49
core/chaintest-core-java/src/main/resources/com/aventstack/chaintest/generator/simple/chaintest-pkg.js

Shape

Method 2,739
Function 1,619
Class 497
Interface 11
Enum 5

Languages

TypeScript89%
Java10%
Python1%

Modules by API surface

core/chaintest-core-java/src/main/resources/com/aventstack/chaintest/generator/simple/chaintest-pkg.js1,040 symbols
cdn/simple/version/chaintest-pkg.js1,040 symbols
cdn/simple/chaintest-pkg.js1,036 symbols
core/chaintest-core-py/src/simple/resources/chart.umd.js1,027 symbols
core/chaintest-core-py/src/__init__.py57 symbols
core/chaintest-core-java/src/main/java/com/aventstack/chaintest/service/ChainPluginService.java22 symbols
core/chaintest-core-java/src/main/java/com/aventstack/chaintest/http/ChainTestApiClient.java22 symbols
plugins/chaintest-testng/src/main/java/com/aventstack/chaintest/plugins/ChainTestListener.java18 symbols
core/chaintest-core-java/src/main/java/com/aventstack/chaintest/generator/ChainLPGenerator.java14 symbols
chainlp/backend/chainlp/src/main/java/com/aventstack/chainlp/api/test/TestService.java14 symbols
core/chaintest-core-java/src/main/java/com/aventstack/chaintest/domain/Test.java11 symbols
core/chaintest-core-java/src/main/java/com/aventstack/chaintest/domain/Build.java11 symbols

Datastores touched

(mysql)Database · 1 repos
chainlpDatabase · 1 repos
chaintestDatabase · 1 repos
chainlpDatabase · 1 repos
chaintestDatabase · 1 repos

For agents

$ claude mcp add chaintest \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page