Skip to content
David Gofman edited this page Jun 22, 2026 · 8 revisions

Welcome to the JPostman Wiki.

JPostman is a lightweight Java library for reusing exported Postman collections and environments in Java API tests. It helps you move API testing workflows from Postman into Java-based test automation projects while keeping your existing Postman collections reusable.

Documentation

YouTube Channel

Watch JPostman tutorials on YouTube:

https://www.youtube.com/@JPostmanAPI

This Wiki will be updated with new tutorial pages as future videos are published.

Tutorial Videos

Part Topic Video Slides Wiki Page
Part 1 JPostman setup and Java Maven API testing project creation YouTube Slides JPostman Tutorial Part 1: JPostman Setup and create a Java Maven API Testing Project
Part 2 Execute REST API requests with RestAssured YouTube Slides JPostman Tutorial Part 2: Execute REST API Requests with RestAssured
Part 3 Access token and chained requests YouTube Slides JPostman Tutorial Part 3: Access Token and Chained Requests
Part 4 Secure API logs with jpostman-secure YouTube Slides JPostman Tutorial Part 4: Secure API Logs with jpostman-secure
Part 5 TestNG support and fluent API testing YouTube Slides JPostman Tutorial Part 5: TestNG Support and Fluent API Testing
Part 6 Fluent API with TestNG and JUnit YouTube Slides JPostman Tutorial Part 6: Fluent API with TestNG and JUnit
Part 7 Multi executor support and secure rules YouTube Slides JPostman Tutorial Part 7: Multi Executor Support and Secure Rules

Tutorial Roadmap

The current tutorials cover setup, REST API execution, chained requests, secure logging, native TestNG support, fluent API improvements, JUnit support, Maven execution, multiple executor adapters, and advanced secure rules:

  1. Create a Java Maven API testing project.
  2. Export Postman collection and environment JSON files.
  3. Add JPostman Maven dependencies.
  4. Execute REST API requests from Java.
  5. Use RestAssured as the execution adapter.
  6. Resolve Postman environment variables.
  7. Validate API responses with assertions.
  8. Chain requests using an access token.
  9. Protect request and response logs with jpostman-secure.
  10. Move reusable secure rules into INI policy profiles.
  11. Use native TestNG support with jpostman-testng.
  12. Reduce boilerplate with fluent request, response, assertion, and verification syntax.
  13. Cache access tokens for reuse across related tests.
  14. Organize TestNG setup and dependent test execution.
  15. Use JPostman native soft assertions with fluent method chaining.
  16. Remove TestNG-only dependsOnMethods for cross-framework test design.
  17. Cache access token execution results with lambda expressions.
  18. Convert the same fluent test flow from TestNG to JUnit.
  19. Run JPostman tests from Maven with consistent compiler settings.
  20. Configure the Maven Compiler Plugin and Maven Surefire Plugin.
  21. Use Maven profiles to control TestNG and JUnit execution.
  22. Run the same JPostman flow with REST Assured, Java HttpClient, Playwright, and Unirest.
  23. Use advanced secure rule syntax with redact, redactRegex, filter, and filterList.

Future tutorials will be added here as new videos are released.

Current Tutorial Series

Part 1: Setup JPostman in a Java Maven Project

The first tutorial explains how to create a Java Maven project and configure it with JPostman.

Topics include:

  • Creating a Maven project.
  • Exporting a Postman collection.
  • Exporting a Postman environment.
  • Adding jpostman-core.
  • Adding TestNG.
  • Loading collection and environment files from src/test/resources.

Wiki page:

https://github.com/JPostman/jpostman/wiki/JPostman-Tutorial-Part-1:-JPostman-Setup-and-create-a-Java-Maven-API-Testing-Project

Part 2: Execute REST API Requests with RestAssured

The second tutorial explains how to execute a REST API request from Java using the JPostman RestAssured adapter.

Topics include:

  • Adding jpostman-restassured.
  • Adding Logback for console logging.
  • Printing the loaded Postman collection.
  • Selecting a request from the collection.
  • Resolving environment placeholders.
  • Executing the request with RestAssuredExecutor.

Wiki page:

https://github.com/JPostman/jpostman/wiki/JPostman-Tutorial-Part-2:-Execute-REST-API-Requests-with-RestAssured

Part 3: Access Token and Chained Requests

The third tutorial explains how to work with access tokens and chained requests.

Topics include:

  • Understanding immutable Request objects.
  • Building resolved requests.
  • Comparing unresolved and resolved requests.
  • Adding status code assertions.
  • Extracting an accessToken from a login response.
  • Passing the token to another request.
  • Creating a chained API test flow.

Wiki page:

https://github.com/JPostman/jpostman/wiki/JPostman-Tutorial-Part-3:-Access-Token-and-Chained-Requests

Part 4: Secure API Logs with jpostman-secure

The fourth tutorial explains how to protect request and response logs with the jpostman-secure module.

Topics include:

  • Adding jpostman-secure.
  • Creating a SecureContext.
  • Wrapping requests with SecureRequest.
  • Wrapping responses with SecureResponse.
  • Using secret(env) and unsecret(...).
  • Masking sensitive fields with redact(...).
  • Protecting headers with headers(...).
  • Reducing response headers with headersFilter(...).
  • Loading secure INI policy files.
  • Applying policy profiles with loadRules(...).
  • Filtering response output with filter(...).

Wiki page:

https://github.com/JPostman/jpostman/wiki/JPostman-Tutorial-Part-4:-Secure-API-Logs-with-jpostman-secure

Part 5: TestNG Support and Fluent API Testing

The fifth tutorial explains how to use native TestNG support and the fluent API testing style introduced in JPostman 1.1.x.

Topics include:

  • Updating the JPostman version to 1.1.3.
  • Replacing separate TestNG, jpostman-core, and jpostman-secure dependencies with jpostman-testng.
  • Moving setup code into @BeforeClass.
  • Using TestNgContext.
  • Validating response fields before reading values.
  • Using custom assertion messages.
  • Using TestNG SoftAssert.
  • Caching an access token for reuse.
  • Using dependsOnMethods for dependent TestNG tests.
  • Using fluent response execution, assertions, and verification.

Wiki page:

https://github.com/JPostman/jpostman/wiki/JPostman-Tutorial-Part-5:-TestNG-Support-and-Fluent-API-Testing

Part 6: Fluent API with TestNG and JUnit

The sixth tutorial continues improving the native TestNG example and then converts the same flow to JUnit.

Topics include:

  • Replacing SecureContext with TestNgContext.
  • Using native JPostman soft assertions.
  • Reducing repeated assertion and verification code.
  • Moving response execution into the fluent API chain.
  • Running custom logic inside the chain with lambda expressions.
  • Using context cache helpers to store values.
  • Removing TestNG-only dependsOnMethods.
  • Caching access token execution results.
  • Generating different tokens with custom cache keys.
  • Converting the fluent test flow from TestNG to JUnit.
  • Using @JPostmanJUnit(printFailures = true) for JUnit failure output.

Wiki page:

https://github.com/JPostman/jpostman/wiki/JPostman-Tutorial-Part-6:-Fluent-API-with-TestNG-and-JUnit

Part 7: Multi Executor Support and Secure Rules

The seventh tutorial explains how to run JPostman tests from Maven and configure the project for both TestNG and JUnit 5 execution.

Topics include:

  • Running JPostman tests from the Maven command line.
  • Fixing Java source and target version errors with the Maven Compiler Plugin.
  • Adding the Maven Surefire Plugin.
  • Using Maven profiles to run JUnit 5 tests with -Pjunit.
  • Avoiding duplicate JUnit failure output with -DskipPrintFailures.
  • Running the same fluent JPostman test flow with multiple executor adapters.
  • Using REST Assured, Java HttpClient, Playwright, and Unirest execution engines.
  • Creating a product rule profile.
  • Using redact, regex-based masking, redactRegex, filter, and filterList.

Wiki page:

https://github.com/JPostman/jpostman/wiki/JPostman-Tutorial-Part-7:-Multi-Executor-Support-and-Secure-Rules

Maven Modules

JPostman provides a core library, native test framework modules, optional executor adapters, and secure logging support.

Module Description
jpostman-core Main library for loading and resolving Postman collections and environments
jpostman-secure Secure request and response logging, redaction rules, and policy profiles
jpostman-testng TestNG context, secure assertions, response verification, and reusable cache helpers
jpostman-junit JUnit 5 context, secure assertions, response verification, and failure printing support
jpostman-restassured RestAssured executor adapter
jpostman-httpclient Java HttpClient executor adapter
jpostman-playwright Playwright executor adapter
jpostman-unirest Unirest executor adapter
jpostman-vault Vault authentication and secret loading helpers
jpostman-github GitHub Actions variable and secret integration utilities
jpostman-kubernetes Kubernetes ConfigMap and Secret loading helpers

Useful Links

Future Updates

This Home page is the starting point for the JPostman tutorial series.

As new videos are created, add them to the Tutorial Videos table and include a short summary under the Current Tutorial Series section.

Clone this wiki locally