@ohos-ports/gatling.io-http
v3.15.105-beta.1
Published
Gatling HTTP DSL for HarmonyOS (ported from @gatling.io/http, backed by the gatling-jvm-bridge runtime)
Readme
Gatling JS - HTTP module (HarmonyOS port)
@ohos-ports/gatling.io-http — HarmonyOS (OpenHarmony, arm64) port of
gatling/gatling-js @gatling.io/http.
Gatling JS is a JavaScript/TypeScript interface for the Gatling load testing tool.
This package contains the Gatling JS DSL for the HTTP protocol.
HarmonyOS runtime prerequisite: gatling-jvm-bridge
Unlike upstream, this port executes the Gatling DSL against a real JVM
(the HarmonyOS user-space OpenJDK from harmonybrew) through a
persistent bridge process. Before using this package you must bootstrap the
gatling-jvm-bridge runtime once:
Install a JDK (e.g. harmonybrew OpenJDK):
export PATH="$HOME/.harmonybrew/bin:$PATH"Create the bridge home with the official Gatling runtime bundle jars:
mkdir -p ~/.gatling-jvm-bridge/libs # install the official Gatling bundle jars into ~/.gatling-jvm-bridge/libsCompile and install the Java bridge shipped in this package (requires the Gatling bundle jars from step 2 on the classpath):
GATLING_JVM_BRIDGE_HOME=~/.gatling-jvm-bridge sh ./bridge/rebuild-bridge.sh
Environment variables:
| Variable | Meaning | Default |
|----------|---------|---------|
| GATLING_JVM_BRIDGE_HOME | bridge runtime home (JavaBridge.class + libs/ jars) | ~/.gatling-jvm-bridge |
| GATLING_JVM_JAVA | java executable used to launch the bridge | auto-detected harmonybrew OpenJDK |
The bridge is started lazily on first DSL use (http, Proxy, check builders, …)
and persists for the lifetime of the Node process; JVM objects travel as
stateful handles, so builder chains run against the same live JVM instances.
Documented limitation (inherited from the platform): JS callbacks cannot cross the process boundary; they are substituted by inert SAM proxies, so DSL builders construct correctly but callback-dependent lambdas throw on use.
To get started with Gatling JS, see our introduction to JavaScript scripting; or simply have a look at our demo projects.
Questions, help?
Read the documentation.
Join the Gatling Community Forum.
Found a real bug? Raise an issue.
