1

I am developing WebUI automation tests using Karate 0.9.5.RC5 and it is working wonderfully. Does anyone know how to execute performance testing in Karate for WebUI Automation tests?

1 Answer 1

2

That's great to hear and thanks for the feedback. To be honest, we have focused on API perf testing and UI functional test automation so far. Maybe you can help us by experimenting and sharing what you find.

You must be aware of the Gatling integration for API performance testing. So we have some pieces of the puzzle in place.

So maybe a hybrid strategy is best:

  • identify the API calls being made by the UI, in the future we would like to derive them automatically from the Chrome network / devtools
  • manually convert the API calls to Karate tests, note that the VS Code plugin has an option to import from cURL
  • now you can convert the Karate tests to a performance test, and for most teams, this is sufficient
  • if needed, you can add some Karate calls to load HTML and static resources to make the load profile more realistic
  • finally, it may be possible to run a Karate UI test in parallel, just to measure "real user" experience and measure the HTML / JS load times etc on the browser side. we don't have this in place yet, but it should be possible to get all the page timings and perf-stats from Chrome
  • potentially you could look at spinning up multiple Chrome instances in parallel using Docker - but again, this is something yet to be explored
Sign up to request clarification or add additional context in comments.

4 Comments

My answer got deleted so adding as comment. @peter-thomas I have developed POC for WebUI Performance Testing using custom gatling events and works with headless chrome and Zalenium instance too. * Please review Sample Gatling Results * Can you please review the code and suggest better approach to implement PerfManager.java ?
@PrashantPatil not sure if this gives you the results you are expecting. what is the objective of the test. to generate load ? or measure the time for each page to load ? your test is going to include the time taken to start chrome right. there is a simple solution to your perfmanager question. just make it a java singleton. does that make sense ?
@PrashantPatil how you will manage to run multiple users because if one user completes its journey it will shut the browser instance.
@Ninja I am using Zalenium Grid to run multiple users and each scenario will have it's own browser instance (node) so those are independent.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.