From 541cdd1b530b85a430e36e3009eb0264b34f00b3 Mon Sep 17 00:00:00 2001 From: Marcin Michniewicz <45601541+aibcmars@users.noreply.github.com> Date: Wed, 4 Nov 2020 17:25:18 +0100 Subject: [PATCH] add documentation --- docs/development/testing.md | 17 +++++++++++++++++ .../performance/bpmn.load.performance.test.ts | 2 +- .../bpmn.navigation.performance.test.ts | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/development/testing.md b/docs/development/testing.md index 97bec79609..cf8900ed36 100644 --- a/docs/development/testing.md +++ b/docs/development/testing.md @@ -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 diff --git a/test/e2e/performance/bpmn.load.performance.test.ts b/test/e2e/performance/bpmn.load.performance.test.ts index 7eb34d0d2d..97e271f3dd 100644 --- a/test/e2e/performance/bpmn.load.performance.test.ts +++ b/test/e2e/performance/bpmn.load.performance.test.ts @@ -29,7 +29,7 @@ const platform = getSimplePlatformName(); const performanceDataFilePath = './performance/data/' + platform + '/data.js'; const metricsArray: Array = []; -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'; diff --git a/test/e2e/performance/bpmn.navigation.performance.test.ts b/test/e2e/performance/bpmn.navigation.performance.test.ts index 424841f661..8eccedda9f 100644 --- a/test/e2e/performance/bpmn.navigation.performance.test.ts +++ b/test/e2e/performance/bpmn.navigation.performance.test.ts @@ -21,7 +21,7 @@ const platform = getSimplePlatformName(); const performanceDataFilePath = './performance/data/' + platform + '/data.js'; const metricsArray: Array = []; -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');