惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
D
Docker
F
Fortinet All Blogs
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
罗磊的独立博客
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
博客园 - 司徒正美
T
Tailwind CSS Blog
C
Check Point Blog
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Proofpoint News Feed
L
LangChain Blog
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
腾讯CDC
Last Week in AI
Last Week in AI
Jina AI
Jina AI
博客园 - Franky
量子位

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
[Hands-on] Guide to Locally Testing Athenz Before Opening...
Jeongwoo Kim · 2026-06-14 · via DEV Community

Jeongwoo Kim

Goal

This post provides a guide on how to run unit tests locally before submitting a Pull Request (PR) to the Athenz repository.

Prerequisite: You must have a local development environment (Java, Maven, etc.) configured to build and run Athenz.


Table of Contents

  • Goal
  • Table of Contents
  • Walkthrough
    • 1. PR Ground Rules
    • 2. Local Setup: Clone the Repository
    • 3. Dependencies Setup
  • How to Run Specific Tests
    • Test an Entire Component
    • Test a Specific Class
    • Test a Specific Method
    • Coverage Test (Jacoco)
  • Troubleshooting: Import Errors

Walkthrough

The following steps outline the process for setting up and testing Athenz locally.

1. PR Ground Rules

Please review the following repository rules before submitting a PR:

  • Use [skip ci]: If your changes do not require CI testing (e.g., documentation updates or typo fixes), add [skip ci] to your PR title to save CI resources. (Reference)
  • Pass formatting checks: You must pass code formatting tests before creating a PR. Running mvn clean install typically handles this. (Reference)

2. Local Setup: Clone the Repository

Clone the official Athenz repository and navigate into the directory:

git clone [https://github.com/AthenZ/athenz.git](https://github.com/AthenZ/athenz.git) && cd athenz

3. Dependencies Setup

[!NOTE]
Running an initial build without this flag may cause test failures due to missing dependencies. It is recommended to run a full install with -DskipTests before making any code changes.

Build the project to install the necessary packages (takes about 16 minutes):

mvn clean install -DskipTests

# [INFO] ------------------------------------------------------------------------
# [INFO] Reactor Summary for AthenZ 1.12.43-SNAPSHOT:
# [INFO]
# [INFO] AthenZ ............................................. SUCCESS [ 11.612 s]
# [INFO] rdl-gen-athenz-server .............................. SUCCESS [  1.734 s]
# [INFO] rdl-gen-athenz-go-model ............................ SUCCESS [  1.178 s]
# [INFO] rdl-gen-athenz-go-client ........................... SUCCESS [  1.020 s]
# [INFO] rdl-gen-athenz-java-model .......................... SUCCESS [  1.125 s]
# [INFO] rdl-gen-athenz-java-client ......................... SUCCESS [  1.179 s]
# [INFO] athenz-zms-core .................................... SUCCESS [  7.690 s]
# [INFO] athenz-zts-core .................................... SUCCESS [  5.397 s]
# [INFO] athenz-msd-core .................................... SUCCESS [  4.993 s]
# [INFO] athenz-auth-core ................................... SUCCESS [  4.309 s]
# [INFO] athenz-client-common ............................... SUCCESS [  1.637 s]
# [INFO] athenz-cert-refresher .............................. SUCCESS [  1.690 s]
# [INFO] athenz-zms-java-client ............................. SUCCESS [  5.229 s]
# [INFO] athenz-zts-java-client ............................. SUCCESS [  5.206 s]
# [INFO] athenz-server-common ............................... SUCCESS [  5.874 s]
# [INFO] athenz-k8s-server-common ........................... SUCCESS [  1.562 s]
# [INFO] athenz-dynamodb-client-factory ..................... SUCCESS [  1.559 s]
# [INFO] athenz-syncer-common ............................... SUCCESS [  1.866 s]
# [INFO] athenz-aws-server-common ........................... SUCCESS [  3.624 s]
# [INFO] athenz-server-gcp-common ........................... SUCCESS [  3.046 s]
# [INFO] athenz-instance-provider ........................... SUCCESS [  3.109 s]
# [INFO] athenz-server-msg-pulsar ........................... SUCCESS [  2.337 s]
# [INFO] athenz-server-notification-slack ................... SUCCESS [  2.014 s]
# [INFO] athenz-zpe-java-client ............................. SUCCESS [  1.906 s]
# [INFO] athenz-msd-java-client ............................. SUCCESS [  4.454 s]
# [INFO] athenz-gcp-zts-creds ............................... SUCCESS [  1.841 s]
# [INFO] athenz-zms-server .................................. SUCCESS [ 11.515 s]
# [INFO] athenz-zts-server .................................. SUCCESS [ 16.613 s]
# [INFO] athenz-jetty-container ............................. SUCCESS [  2.593 s]
# [INFO] athenz-auth-history-syncer ......................... SUCCESS [  5.755 s]
# [INFO] athenz-zms-aws-domain-syncer ....................... SUCCESS [  2.542 s]
# [INFO] athenz-zms-gcp-domain-syncer ....................... SUCCESS [  2.743 s]
# [INFO] zms-go-client ...................................... SUCCESS [ 28.624 s]
# [INFO] zts-go-client ...................................... SUCCESS [  2.974 s]
# [INFO] msd-go-client ...................................... SUCCESS [  2.936 s]
# [INFO] sia-go-lib ......................................... SUCCESS [01:49 min]
# [INFO] zmscli ............................................. SUCCESS [  3.878 s]
# [INFO] zmssvctoken ........................................ SUCCESS [ 13.350 s]
# [INFO] ztsclientutil ...................................... SUCCESS [  2.409 s]
# [INFO] athenzconf ......................................... SUCCESS [  1.288 s]
# [INFO] usercert ........................................... SUCCESS [  9.949 s]
# [INFO] sia-aws-ec2 ........................................ SUCCESS [04:15 min]
# [INFO] sia-aws-eks ........................................ SUCCESS [ 22.090 s]
# [INFO] sia-aws-fargate .................................... SUCCESS [  9.466 s]
# [INFO] sia-azure-vm ....................................... SUCCESS [  4.781 s]
# [INFO] sia-build-kite ..................................... SUCCESS [ 12.964 s]
# [INFO] sia-gcp-gce ........................................ SUCCESS [ 52.004 s]
# [INFO] sia-gcp-gke ........................................ SUCCESS [ 21.204 s]
# [INFO] sia-gcp-run ........................................ SUCCESS [ 20.085 s]
# [INFO] sia-github-actions ................................. SUCCESS [  5.740 s]
# [INFO] sia-harness ........................................ SUCCESS [  5.529 s]
# [INFO] sia-spacelift ...................................... SUCCESS [ 20.759 s]
# [INFO] zms-cli ............................................ SUCCESS [  3.165 s]
# [INFO] athenz-conf ........................................ SUCCESS [  1.306 s]
# [INFO] zms-domainattrs .................................... SUCCESS [  3.052 s]
# [INFO] zms-svctoken ....................................... SUCCESS [  2.400 s]
# [INFO] zms-authhistory .................................... SUCCESS [  2.145 s]
# [INFO] zpe-updater ........................................ SUCCESS [  4.181 s]
# [INFO] zts-roletoken ...................................... SUCCESS [  2.008 s]
# [INFO] zts-accesstoken .................................... SUCCESS [  2.019 s]
# [INFO] zts-idtoken ........................................ SUCCESS [  2.062 s]
# [INFO] zts-rolecert ....................................... SUCCESS [  3.681 s]
# [INFO] zts-svccert ........................................ SUCCESS [  2.051 s]
# [INFO] zts-svctoken ....................................... SUCCESS [  2.121 s]
# [INFO] zts-usercert ....................................... SUCCESS [  2.019 s]
# [INFO] msd-agent .......................................... SUCCESS [  3.766 s]
# [INFO] athenz-auth-core-nodejs ............................ SUCCESS [ 40.861 s]
# [INFO] athenz-zts-nodejs-client ........................... SUCCESS [ 13.504 s]
# [INFO] athenz-zpe-nodejs-client ........................... SUCCESS [ 15.892 s]
# [INFO] ui ................................................. SUCCESS [ 58.317 s]
# [INFO] athenz-zms ......................................... SUCCESS [  6.516 s]
# [INFO] athenz-zts ......................................... SUCCESS [  7.730 s]
# [INFO] athenz-ui .......................................... SUCCESS [ 44.331 s]
# [INFO] athenz-utils ....................................... SUCCESS [ 12.492 s]
# [INFO] ------------------------------------------------------------------------
# [INFO] BUILD SUCCESS
# [INFO] ------------------------------------------------------------------------
# [INFO] Total time:  16:10 min
# [INFO] Finished at: 2026-06-13T17:59:23+09:00
# [INFO] ------------------------------------------------------------------------

If the build fails at a certain point, you can resume it from a specific module:

mvn clean install -rf :athenz-zts-java-client


How to Run Specific Tests

Athenz contains a large test suite. Below are the commands to run specific segments of the tests based on your needs.

Test an Entire Component

To test a whole server module (e.g., zts or zms), use the following command:

mvn test -pl servers/zts

Test a Specific Class

To test a specific class file, use the -Dtest option:

mvn test -pl servers/zts -Dtest=AccessTokenRequestTest
mvn test -pl servers/zts -Dtest=ZTSImplAccessTokenTest

Test a Specific Method

To test a single method within a class, use # to specify the method name:

mvn test -pl servers/zts -Dtest=AccessTokenRequestTest#testAccessTokenRequestJWTBearer

Coverage Test (Jacoco)

To generate a Jacoco report alongside your test for coverage verification:

mvn test jacoco:report -pl servers/zts -Dtest=AccessTokenRequestTest


Troubleshooting: Import Errors

Todo: This section is a work in progress and will cover common IDE import errors and resolution steps.

mvn clean test jacoco:report -pl servers/zts -Dtest=ZTSImplAccessTokenTest

Then:

open servers/zts/target/site/jacoco/index.html
open /servers/zts/target/site/jacoco/com.yahoo.athenz.zts/ZTSImpl.html

And you can see based on the function:

# processJAGTokenExchangeRequest(ResourceContext, Principal, AccessTokenRequest, String, String)