diff --git a/astro.config.mjs b/astro.config.mjs index 413a857c..fed194fe 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -231,10 +231,11 @@ export default defineConfig({ items: [ { label: 'Overview', link: '/test-reporting'}, { label: 'Testomat.io Reporter', link: '/test-reporting/reporter'}, - { label: 'NodeJS Test Frameworks', link: '/test-reporting/frameworks'}, + { label: 'JavaScript Frameworks', link: '/test-reporting/frameworks'}, { label: 'Java Frameworks', link: '/test-reporting/java-reporter'}, { label: 'PHP Test Frameworks', link: '/test-reporting/php'}, { label: 'Python Test Frameworks', link: '/test-reporting/python'}, + { label: 'Robot Framework', link: '/test-reporting/robot-framework'}, { label: 'Other Test Frameworks', link: '/test-reporting/junit'}, { label: 'Test Artifacts', link: '/test-reporting/artifacts'}, { label: 'Configuration', link: '/test-reporting/configuration'}, diff --git a/src/content/docs/test-reporting/frameworks.md b/src/content/docs/test-reporting/frameworks.md index 7c85c3c2..10b6a3f0 100644 --- a/src/content/docs/test-reporting/frameworks.md +++ b/src/content/docs/test-reporting/frameworks.md @@ -1,5 +1,5 @@ --- -title: NodeJS Test Frameworks +title: JavaScript Frameworks description: The Testomat.io framework integration guide explains how to implement different testing frameworks and reporting tools. It details configuration options for test reporting, integrating frameworks like Mocha, Jasmine, and Jest, and the generation of reports from automated tests. Additionally, the guide covers debugging, error handling, and customizing test reports to fit specific project needs. type: article url: https://docs.testomat.io/test-reporting/frameworks diff --git a/src/content/docs/test-reporting/robot-framework.md b/src/content/docs/test-reporting/robot-framework.md new file mode 100644 index 00000000..a89fbe85 --- /dev/null +++ b/src/content/docs/test-reporting/robot-framework.md @@ -0,0 +1,100 @@ +--- +title: Robot Framework +description: Import Robot Framework tests into Testomat.io and report test results with the Testomatio listeners. +type: article +url: https://docs.testomat.io/test-reporting/robot-framework +head: + - tag: meta + attrs: + name: keywords + content: Testomat.io, Robot Framework, test reporting, test import, Python, automation testing +--- + +The `robot-framework-reporter` plugin integrates Robot Framework with Testomat.io. It can import tests and report test execution results in real time. + +## Requirements + +- Python 3.10 or newer +- Robot Framework 4.0 or newer +- A Testomat.io project API key + +## Installation + +Install the plugin with pip: + +```bash +pip install robot-framework-reporter +``` + +If your system has both Python 2 and Python 3, use `pip3`: + +```bash +pip3 install robot-framework-reporter +``` + +## Get a project API key + +1. Sign in to Testomat.io. +2. Create a project or open an existing one. +3. Select **Import from Source Code**. +4. Copy the project API key. It starts with `tstmt_`. + +## Import tests + +Use the `Testomatio.Import` listener to import Robot Framework tests into Testomat.io: + +```bash +TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Import path/to/tests +``` + +After import, Testomat.io assigns a Test ID to each test. + +### Preserve existing Test IDs + +To import tests with their existing Test IDs into another project, enable the `create` option: + +```bash +TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Import:create=1 path/to/tests +``` + +### Keep the source structure + +To preserve the suite and folder structure from the source code, enable the `structure` option: + +```bash +TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Import:structure=1 path/to/tests +``` + +## Report test results + +Use the `Testomatio.Report` listener to run tests and send their results to Testomat.io: + +```bash +TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Report path/to/tests +``` + +The listener creates a test run in Testomat.io and uploads results after each test suite completes. + +## Configuration + +Both listeners support these environment variables: + +| Variable | Description | Default | +| --- | --- | --- | +| `TESTOMATIO` | Testomat.io project API key | Required | +| `TESTOMATIO_URL` | Testomat.io server URL | `https://app.testomat.io` | +| `TESTOMATIO_REQUEST_INTERVAL` | Interval between requests in seconds | `5` | +| `TESTOMATIO_MAX_REQUEST_FAILURES` | Maximum number of attempts to send a request | `5` | + +The report listener also supports: + +| Variable | Description | Default | +| --- | --- | --- | +| `TESTOMATIO_RUN` | ID of an existing test run | A new run is created | +| `TESTOMATIO_TITLE` | Test run title | None | +| `TESTOMATIO_RUNGROUP_TITLE` | Run group title | None | +| `TESTOMATIO_PUBLISH` | Publish the run and generate a public URL | `False` | +| `TESTOMATIO_DISABLE_BATCH_UPLOAD` | Upload each result separately | `False` | +| `TESTOMATIO_BATCH_SIZE` | Number of results uploaded in a batch, up to 100 | `50` | + +For all available import and reporting options, see the [`robot-framework-reporter` documentation](https://github.com/testomatio/robot-framework-reporter). diff --git a/src/scripts/runok.cjs b/src/scripts/runok.cjs index fb7683be..72109734 100644 --- a/src/scripts/runok.cjs +++ b/src/scripts/runok.cjs @@ -122,7 +122,7 @@ module.exports = { title[0] = title[0].toUpperCase(); const titleId = title.toUpperCase(); - if (titleId === 'FRAMEWORKS') title = "NodeJS Test Frameworks"; + if (titleId === 'FRAMEWORKS') title = "JavaScript Frameworks"; if (titleId === 'TESTOMATIO') title = "Advanced Options" if (titleId === 'JUNIT') title = "JUnit Reporter" let contents;