-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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.
Watch JPostman tutorials on YouTube:
https://www.youtube.com/@JPostmanAPI
This Wiki will be updated with new tutorial pages as future videos are published.
| 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 |
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:
- Create a Java Maven API testing project.
- Export Postman collection and environment JSON files.
- Add JPostman Maven dependencies.
- Execute REST API requests from Java.
- Use RestAssured as the execution adapter.
- Resolve Postman environment variables.
- Validate API responses with assertions.
- Chain requests using an access token.
- Protect request and response logs with
jpostman-secure. - Move reusable secure rules into INI policy profiles.
- Use native TestNG support with
jpostman-testng. - Reduce boilerplate with fluent request, response, assertion, and verification syntax.
- Cache access tokens for reuse across related tests.
- Organize TestNG setup and dependent test execution.
- Use JPostman native soft assertions with fluent method chaining.
- Remove TestNG-only
dependsOnMethodsfor cross-framework test design. - Cache access token execution results with lambda expressions.
- Convert the same fluent test flow from TestNG to JUnit.
- Run JPostman tests from Maven with consistent compiler settings.
- Configure the Maven Compiler Plugin and Maven Surefire Plugin.
- Use Maven profiles to control TestNG and JUnit execution.
- Run the same JPostman flow with REST Assured, Java HttpClient, Playwright, and Unirest.
- Use advanced secure rule syntax with
redact,redactRegex,filter, andfilterList.
Future tutorials will be added here as new videos are released.
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:
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:
The third tutorial explains how to work with access tokens and chained requests.
Topics include:
- Understanding immutable
Requestobjects. - Building resolved requests.
- Comparing unresolved and resolved requests.
- Adding status code assertions.
- Extracting an
accessTokenfrom a login response. - Passing the token to another request.
- Creating a chained API test flow.
Wiki page:
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)andunsecret(...). - 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:
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, andjpostman-securedependencies withjpostman-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
dependsOnMethodsfor dependent TestNG tests. - Using fluent response execution, assertions, and verification.
Wiki page:
The sixth tutorial continues improving the native TestNG example and then converts the same flow to JUnit.
Topics include:
- Replacing
SecureContextwithTestNgContext. - 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
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
productrule profile. - Using
redact, regex-based masking,redactRegex,filter, andfilterList.
Wiki page:
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 |
- YouTube Channel: https://www.youtube.com/@JPostmanAPI
- JPostman API Documentation: https://jpostman.github.io/jpostman/
- GitHub Repository: https://github.com/JPostman/jpostman
- GitHub Wiki: https://github.com/JPostman/jpostman/wiki
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.