more info about the budget

This commit is contained in:
soulgalore 2016-10-24 15:29:49 +02:00
parent b3c59c9237
commit ecaf2ff9d5
2 changed files with 25 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

@ -33,11 +33,10 @@ The log will look something like this:
[2016-10-24 10:53:01] Budget: 8 working and 4 failing tests
~~~
<!--
And the report looks like this.
![Example of the budget](budget.png)
{: .img-thumbnail}
-->
Lets see how you configure your budgets.
@ -45,6 +44,10 @@ Lets see how you configure your budgets.
### The budget file
The current version can handle min/max values and works on the internal data structure.
You can read more about the metrics/data structure in the [metrics section]({{site.baseurl}}/documentation/sitespeed.io/metrics/).
~~~
{
"browsertime.pageSummary": [{
@ -97,3 +100,23 @@ Then run it like this:
~~~bash
$ sitespeed.io https://www.sitespeed.io/ --budget myBudget.json -b chrome -n 11
~~~
And if the budget fails the exit status will be > 0. And you can also choose to report the budget as JUnitXML (Jenkins) and TAP.
### JUnit XML
You can output a JUnit XML file from the budget result like this.
~~~bash
$ sitespeed.io https://www.sitespeed.io/ --budget myBudget.json --budget.output junit -b chrome -n 5
~~~
It will create a *junit.xml* in the outputFolder.
### TAP
If you instead uses TAP, you can do like this:
~~~bash
$ sitespeed.io https://www.sitespeed.io/ --budget myBudget.json --budget.output tap -b chrome -n 5
~~~
And it will create a *budget.tap* fill in the configured outputFolder.