Print

Start with API modelling(Setup Host)

Note that API modelling requires a valid JOSF license.

Testing APIs or services is becoming an increasingly important part of the test automation process.
Even though tests through the GUI are a reliable way of verifying end-to-end behavior, API testing is faster, more stable, and better suited for automation at scale.

With JOSF, you can model and execute API requests directly within your project. By creating API models, you are building reusable blocks that can later be used in your automated test flows, just like any other JOSF test step.

Once you have imported or created your first API host, you can:

  • Run individual API requests on demand
  • Modify your resources and requests exposed to your testscripts
  • Validate response data and status codes in the same flow

What is a Host

In JOSF, a host represents the base definition of an API or service.
It contains all available endpoints, methods, parameters, and models.
It is the entry point for your API testing; everything else, such as resources, requests, and test cases, builds upon this host.

JOSF provides four main ways to create a host, depending on how your API is defined or documented.


1. URL Definition

If your API is already documented and accessible online, this is the most common method.
JOSF accepts three types of service definition URLs:

  • WSDL (for SOAP-based services)
  • Swagger 2.0 (for REST APIs using Swagger/OpenAPI 2)
  • OpenAPI / Swagger 3.1.X (for modern REST APIs)

Paste the definition URL into JOSF and click Import.
You can also paste the raw definition content (JSON or XML) instead of the URL; JOSF will process it the same way.

After importing, JOSF automatically:

  • Creates a new host with all defined resources and requests
  • Parses endpoints, parameters, and request bodies
  • Makes your API ready for immediate testing

Optional import settings:

  • Skip optional parameters: excludes parameters marked as optional from the request body or parameter list.
  • Create variables in API requests: replaces all request values with JOSF variables using the ${variable} syntax.

These settings are useful when you want to keep requests focused on required parameters or prepare your host for data-driven testing.


After Import: Review and Generate Test Cases

Once your host is imported, review the generated data.
If you enabled the option “Create variables in API requests”, you can automatically generate test cases from your host.

For each API request, JOSF creates a testcase containing:

  1. An API Call group that contains the request action itself.
  2. A Verifications group that contains a default Verify Status Code action.

This provides a starting point for API testing.
You can extend these test cases with additional verifications or chain them with other API calls or UI steps.


2. Raw Definition

If your API is not hosted online, you can import the raw definition directly.
Paste your Swagger, OpenAPI, or WSDL content into the editor and click Import.
JOSF will parse the data and create your host as if it were loaded from a URL.


3. CURL Import

If you have a collection of curl commands, for example exported from your browser or documentation, you can paste them into the CURL field to automatically create a host.

JOSF will:

  • Detect each request
  • Extract method, headers, and body
  • Generate resources and request definitions

This is an efficient way to create a host from existing examples without needing a full definition.


4. Custom Host (Skip API Definition)

In some cases, you may want to define a host manually without an existing specification.
Choose the Custom (Skip API Definition) option to create a host from scratch.

Provide the following information:

  • Title: name of the host
  • Definition URL: optional, often left empty when defining a custom host
  • Scheme: for example, https, http;
  • Base URL: the server or domain of your API
  • Base Path: the common path segment for all endpoints, for example /api/v1
  • Description: a short summary of what the host represents

This approach gives you full flexibility to manually define endpoints later in the API definition tree.


Next Steps

You have now created your first API host.
The next step is to explore its structure and understand how JOSF organizes endpoints, resources, and requests.
Continue with the next topic: API Definition Tree.


Summary

MethodDescriptionIdeal For
URL DefinitionImport API from a public or local definition URLHosted APIs (Swagger, OpenAPI, WSDL)
Raw DefinitionPaste JSON or XML definition manuallyOffline or local API definitions
CURL ImportConvert existing curl requests into API modelsQuick setup from examples
Custom HostCreate a host manuallyInternal APIs or prototypes

In this document