Closed RaduIG closed 8 months ago
@RaduIG thanks for the detailed issue description! I guess that what you experienced is the normal behavior when the option is set by default to: 'disableAppendToExistingFile: false'. By default, previous data is not deleted from the 'performanceResultsDirectory' to enable accumulation of data to increase statistic accuracy. You can change this behavior by either of the following steps:
FYI, even if you accumulate a large amount of data from previous runs, it won't affect your tests runtime because the analysis of the data is occurring after the tests in a worker are done.
@tzurp thank you very much for your reply. I will test the suggestions you mentioned and come back with a reply, but please note that my feedback would most likely come either at the end of this week or next week at the latest due to some scheduling issues on my side. Please do not close the issue until then, thanks again!
@tzurp I will close the issue as I have found a much more convenient (and simpler) solution for my situation: instead of using one of the methods you suggested (which would imply refactoring some functions), I found it quicker and easier to run the tests using a separate wdio.config file using a separate tag. This avoids mixing the E2E tests and the performance ones and also allows me to run my tests independently on our Jenkins server.
Thank you again for your help!
I have integrated the PerformanceTotal plugin 3.1.0 to the following framework:
Status: currently I have created a suite of E2E tests using the libraries above and for certain page transitions and some actions I would like to record the elapsed time using the PerformanceTotal plugin. For this purpose I have created separate feature files that are copy of the existing E2E that have the additional sampleStart and sampleEnd functions defined as steps in order to monitor the performance statistics wherever it is required.
Issue: after installing the performanceTotal plugin, whenever I start a test that does NOT contain the sampleStart/sampleEnd steps, the plugin still runs and generates results files with the last known values. This is not quite correct as it would affect ALL my E2E tests increasing run time and polluting the logs.
Question: would it be possible to have the performanceTotal plugin NOT affect feature files where the sampleStart/End functions are NOT used so that the results log are not displayed?
Steps definitions:
Given(/^I start performance analysis for feature: "([^"]*)?"$/, async (feature) => { performancetotal.sampleStart(feature); });
Given(/^I end performance analysis for feature: "([^"]*)?"$/, async (feature) => { performancetotal.sampleEnd(feature); });
Usage in performance feature files:
`@performance @generic Scenario: Login performance Given I start performance analysis for feature: "Login" When I log in as Admin user