serenity-bdd / serenity-cucumber

Cucumber integration for the Serenity BDD Reporting library
Other
78 stars 74 forks source link

Slowdown in Serenity versioning #219

Open AlejandroCardenas13 opened 4 years ago

AlejandroCardenas13 commented 4 years ago

Hi, we are currently using version 2.0.30 for Serenity libraries (Core, jUnit, ScreenPlay, ScreenPlay WebDriver) and version 1.9.4 for Serenity Cucumber, we are currently stuck in these versions because when we update the versions we see that automation becomes too slow. Example : Two scenarios executed with version 2.0.30 :

image

With the latest version tested 2.0.90 we observe the following behavior for the same two scenarios:

image

The runtime was more than double that with version 2.0.30, we would like to know if we are applying something wrong or if the failure is an issue of versioning by Serenity

Thanks.

mi-akram commented 4 years ago

We are also experiencing a significant slowdown after updating to the latest versions of serenity. We were previously using: name: 'serenity-core', version: '2.0.48' name: 'serenity-junit', version: '2.0.48' name: 'serenity-rest-assured', version: '2.0.48' name: 'serenity-cucumber', version: '1.9.37'

The total execution time for a test using the above versions is: 14 seconds: image

Upgrading to the latest versions slows the total execution time to around 22 seconds: name: 'serenity-core', version: '2.2.0' name: 'serenity-junit', version: '2.2.0' name: 'serenity-rest-assured', version: '2.2.0' name: 'serenity-cucumber5', version: '2.2.0'

image

I can also confirm we are experiencing the same behaviour on multiple machines.

Thanks.

wakaleo commented 4 years ago

Can you isolate a specific version change that causes the problem? Also, do you have any REST tests?

mi-akram commented 4 years ago

I can confirm we do have REST tests, but the test above is just a front end test, no REST APIs are called during the test.

With regards to specific version I am experiencing the issue with latest versions. Finding the issue in the specific issue would take a long time to isolate as it would require checking through every version from where it was working fine.

wakaleo commented 4 years ago

It’s probably the ByteBuddy initialisation for the REST integration then. If it’s a fixed time at the start of the tests, then it’s probably normal and there is not much we can do.

mi-akram commented 4 years ago

We can also see a bit of a slow down when actually driving the test through the browser. i.e. navigating to certain pages etc.

wakaleo commented 4 years ago

Without the exact version change this will be very hard to diagnose. Have you tried with and without screenshots?

mi-akram commented 4 years ago

Disabling the screenshots within the serenity.properties file did make a little improvement but still not returning to the the level to what I would expect - (version used without the potential issue).

Also when running the REST APIs test the screenshots change has not made much of a difference. Does the ByteBuddy initialisation cause a delay at the start of the test run, or before each and every test?

wakaleo commented 4 years ago

ByteBuddy causes a delay at the start of the test run only. Feel free to dig into the code to troubleshoot if you would like to propose a fix.