HTML Reference
This HTML reference explains all supported HTML tags and attributes if you want to send fields with rich formatting to Testmo.
Last updated
This HTML reference explains all supported HTML tags and attributes if you want to send fields with rich formatting to Testmo.
Last updated
You can submit fields with HTML values for your automated tests. This is useful to include richer data with your tests, including tables, source code, test steps, lists and rich text formatting. If you are unsure about how to use fields with automated tests, take a look at our documentation on test fields. Below you can find a full reference of supported HTML tags and attributes, plus various examples.
Not all HTML tags and attributes are supported (to ensure that the content can be displayed nicely and doesn't affect the rest of Testmo's interface). Unsupported tags and attributes are automatically ignored.
See below for a list of supported tags and their attributes (in square brackets).
a[href]
, b
, br
, code[class]
, del
, em
, figure[class|style]
, h1
, h2
, h3
, h4
, hr
, i
, img[title|alt|src|class|style]
, li
, mark[class]
, ol
, p[style]
, pre[class]
, s
, strong
, table
, test-steps
, test-step[status]
, test-step-subfield[name]
, tbody
, td[colspan|rowspan]
, th[colspan|rowspan]
, thead
, tr
, u
, ul
See below for a list of supported CSS classes. Not all CSS classes make sense for all HTML tags of course. See below for some examples.
code-block
, editor-*
, image
, image-inline
, image-style-block-align-left
, image-style-block-align-right
, language-*
, marker-blue
, marker-green
, marker-pink
, marker-red
, marker-yellow
, pen-green
, pen-red
, table
The following style values are allowed:
text-align
(paragraphs), width
(images)
You can use various HTML tags to nicely format your text, e.g. with headings, color markers, lists, font styles and more. Here's an example for some typical text formatting:
It can often be useful to include data in tables, e.g. if you want to display sample data or configurations. Here's an example for a full featured table:
You can also render code with syntax highlighting. This can be useful if you want to include some of your test scripts, such as Gherkin/BDD code or similar code.
Currently we have enabled the following syntax highlighters. You can also use this code block without specifying any language-
class for syntax highlighting. Feel free to let us know if you need any other language:
basic
, c
, clike
, cpp
, csharp
, css
, dart
, gherkin
, go
, html
, java
, javascript
, json
, kotlin
, markup
, markup
, objectivec
, pascal
, perl
, php
, plain
, python
, r
, ruby
, rust
, shell
, sql
, swift
, typescript
, yaml
Testmo can also display test steps. The steps are displayed just like manual steps in the test case repository and in manual test runs. You can optionally also include a result status for each step, as well as optional sub fields.
Note: Testmo can add steps automatically
If you are using JUnit XML files and our Testmo CLI tool to submit your test results, then Testmo can automatically format and add steps for you. You would simply use step
fields/properties, and there is no need to manually format the test step HTML tags then (except sub fields).
A basic example with steps and result statuses:
This example has test steps with sub fields: