Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aibcmars committed Nov 4, 2020
1 parent 2253da0 commit 541cdd1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions docs/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,23 @@ an `HTTP 400 error`.
In that case, configure an alternate load method by referencing the name of the test BPMN diagram in the load configuration
settings.

### Performance tests
For now these tests are defined under `/test/e2e/performance/` as the performance is being measured for complex(e2e) tasks:
- display diagram
- zoom in / zoom out loaded diagram

#### Why?
To have visibility if new changes have impact on current performance

#### Results
The results are under `/test/e2e/performance/data/`
Preview is available in the browser, simply open file `/bpmn-visu-js/test/e2e/performance/index.html` in your favourite browser

#### Run the performance tests
For the moment we have decided to run them manually, in the future they may be run automatically - this however, depends on received results
To run these tests, follow next steps:
1. cd `bpmn-visu-js\test\e2e`
2. run `jest --runInBand --detectOpenHandles --testNamePattern=^performance`

## Running tests

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/performance/bpmn.load.performance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const platform = getSimplePlatformName();
const performanceDataFilePath = './performance/data/' + platform + '/data.js';
const metricsArray: Array<PerformanceMetric> = [];

describe.each([1, 2, 3, 4, 5])('diagram navigation performance', run => {
describe.each([1, 2, 3, 4, 5])('load performance', run => {
// to have mouse pointer visible during headless test - add 'showMousePointer=true' to queryParams

const fileName = 'B.2.0';
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/performance/bpmn.navigation.performance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const platform = getSimplePlatformName();
const performanceDataFilePath = './performance/data/' + platform + '/data.js';
const metricsArray: Array<PerformanceMetric> = [];

describe.each([1, 2, 3, 4, 5])('diagram navigation performance', run => {
describe.each([1, 2, 3, 4, 5])('zoom performance', run => {
// to have mouse pointer visible during headless test - add 'showMousePointer=true' to queryParams
const bpmnDiagramPreparation = new BpmnDiagramPreparation(new Map([['B.2.0', BpmnLoadMethod.Url]]), { name: 'navigation-diagram', queryParams: [] }, 'performance');

Expand Down

0 comments on commit 541cdd1

Please sign in to comment.