Getting started
Install
npm install --save-dev @pumpo5.dev/core
Configuration file
Like the Java client, configuration is read from a file named exactly config.conf. It is located, in order:
- From the path in the
CONFIG_PATHenvironment variable, if set. - From a
config.confpath passed as a NodeJS command line argument. - From a
config.conffile found in the project's root folder or a directory above it.
At minimum it needs the farm URL:
webdriverUrl="http://localhost:4444"
The full list of general keys (chromeOptions, browserName, browserVersion, timeZone, sessionTimeout,
testerName) is documented in the
package README.
Driver8 (Kafka, SFTP)
Driver8 capabilities are exposed as Playwright fixtures (kafka, sftp) rather than as method parameters annotated
with @Capability the way the Java client does it - TypeScript erases interface types at runtime, so there is no
literal equivalent of annotation-driven injection. A fixture achieves the same effect: declare it in the test's
argument object and it is created (and torn down) automatically.
import { test, expect } from '@pumpo5.dev/core'
test('lists Kafka topics', async ({ kafka }) => {
const result = await kafka.listTopics()
expect(result.topics.length).toBeGreaterThan(0)
})
Connection details (URL/host, username, password) are not read from webdriverUrl-style typed config keys.
Instead each fixture resolves them from a named profile - see Kafka and
SFTP for the exact keys and the config.conf / environment variable precedence
rules, and for how to pick a non-default profile per test with test.use().
Running the driver8 smoke tests in this repo
The pumpo-number-five-nodejs repo ships two read-only smoke tests exercising this end to end:
npm run playwright-test-driver8-kafka -w=integration-tests/
npm run playwright-test-driver8-sftp -w=integration-tests/
Both skip cleanly (rather than failing) when their profile's connection details are not configured.