@testomatio/reporter 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +8 -0
- package/README.md +29 -2
- package/lib/xmlReader.js +1 -1
- package/package.json +1 -1
package/Changelog.md
CHANGED
package/README.md
CHANGED
|
@@ -246,7 +246,7 @@ TESTOMATIO={API_KEY} npx report-xml "{pattern}" --lang={lang}
|
|
|
246
246
|
```
|
|
247
247
|
|
|
248
248
|
* `pattern` - is a glob pattern to match all XML files from report. For instance, `"test/report/**.xml"` or just `report.xml`
|
|
249
|
-
* `--lang` option
|
|
249
|
+
* `--lang` option can be specified to identify source code of the project. Example: `--lang=Ruby` or `--lang=Java` or `--lang=Python`.
|
|
250
250
|
* `--java-tests` option is avaiable for Java projects, and can be set if path to tests is different then `src/test/java`. When this option is enable, `lang` option is automatically set to `java`
|
|
251
251
|
|
|
252
252
|
|
|
@@ -273,7 +273,7 @@ TESTOMATIO={API_KEY} npx report-xml report.xml --lang=python
|
|
|
273
273
|
Run tests via Maven, make sure JUnit report was configured in `pom.xml`.
|
|
274
274
|
|
|
275
275
|
```
|
|
276
|
-
|
|
276
|
+
mvn clean test
|
|
277
277
|
```
|
|
278
278
|
|
|
279
279
|
Import report with this command:
|
|
@@ -308,6 +308,33 @@ Import reports from `test/reports` directory:
|
|
|
308
308
|
TESTOMATIO={API_KEY} npx report-xml "test/reports/*.xml" --lang ruby
|
|
309
309
|
```
|
|
310
310
|
|
|
311
|
+
### Artifacts
|
|
312
|
+
|
|
313
|
+
Screenshots or videos from tests are uploaded if a test contains output with a path to file of following format:
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
file://path/to/screenshot.png
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
For instance, inside Java test you can use `System.out.println` to print a path to file that should be uploaded as a screenshot.
|
|
320
|
+
|
|
321
|
+
```java
|
|
322
|
+
System.out.println("file://" + pathToScreenshot);
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
This will produce XML report which contains path to a file:
|
|
326
|
+
|
|
327
|
+
```xml
|
|
328
|
+
<testcase>
|
|
329
|
+
<system-out><![CDATA[
|
|
330
|
+
file://path/to/scrrenshot.png
|
|
331
|
+
]]></system-out>
|
|
332
|
+
</testcase>
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
When uploaded XML report, all files from `file://` will be uploaded to corresponding tests.
|
|
336
|
+
|
|
337
|
+
|
|
311
338
|
## Advanced Usage
|
|
312
339
|
|
|
313
340
|
### Create Unmatched Tests
|
package/lib/xmlReader.js
CHANGED