Keyboard

↓ ↑
move between the rows you can see
→
open a feature, then step into it
←
close a feature, or step out to the one above
Enter
go to the page in focus
Tab
the same rows, plus everything else on the page
/
search the whole report
m
open or close the navigation drawer
Esc
leave the search box, or close the drawer
?
this list

Lets your template extend a built-in one and fill its blocks

All 3 scenarios hold

Pebble templates render a report, and a project can supply its own. Point the reporter at a template directory. The reporter then uses the files in that directory in place of the built-in templates, or on top of them.

The rules below read a report of one test class named Calendar. That class holds one table named Leap years, with the columns Year and Leap? and one row, 2004 and Yes. A report that small lets a rule state a whole page.

Replacing a template means rewriting the page. Extending one means naming the built-in template and filling only the blocks it leaves open. The reporter then keeps rendering the table itself.

There are three such blocks: frontMatter above the page, title in place of the generated heading, and footer below it.

A template that fills one block reads:

{% extends "table.md.peb" %} {% block frontMatter %} … {% endblock %}

expected outcome broken scenario
ScenarioBlockFilled withPage?
Front matter above the pagefrontMatter
  • ---
  • layout: report
  • ---
  • ---
  • layout: report
  • ---
  • ## Leap years
  • “”
  • | Year | Leap? |
  • | --- | --- |
  • | 2004 | Yes |
A heading of your owntitle
  • # {{ title }} of note
  • # Leap years of note
  • “”
  • “”
  • | Year | Leap? |
  • | --- | --- |
  • | 2004 | Yes |
A footer below the pagefooter
  • “”
  • _Generated by us_
  • ## Leap years
  • “”
  • | Year | Leap? |
  • | --- | --- |
  • | 2004 | Yes |
  • “”
  • _Generated by us_