cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Possible performance improvements for OPA5 tests?

gregorw
SAP Mentor
SAP Mentor
827

Hello SAPUI5 Community, Hi vobu our UI5 Testing Guru :-),

I help the developers in a project that uses CAP in the Backend and a mix of SAPUI5 Freestyle and Fiori Elements. For the automated testing we use OPA5. In the beginning when we had about 20 tests that ran for 5 minutes. It increased to 50 tests that take 12 minutes. Right now we have 80 tests and they need 23 minutes. We're already using the mockserver to avoid delays of backend calls.

My question is now what options do we have to improve the performance? Is there a way to i.e. parallelize the tests (which might be an option in the CI/CD pipeline)? Is there a simple way for the developer to run only a specific test in the first place?

Best Regards
Gregor

Accepted Solutions (0)

Answers (1)

Answers (1)

vobu
SAP Mentor
SAP Mentor
0 Kudos

Hi, in terms of parallelization of OPA5: not ootb. Only way to achieve that would be to

- launch karma multiple times on separate ports

- split OPA tests in separate suites

- run 1 split on 1 karma instance

In terms of running selected tests only, there's unfortunately no such thing as opaTest.only() or opaOnly() - but there is opaSkip() and opaTodo() in https://sapui5.hana.ondemand.com/resources/sap/ui/test/opaQunit-dbg.js

My recommendation would be to switch to wdi5 here https://js-soft.github.io/wdi5/#/ :

- test suite parallelization ootb

- selectors/locators OPA5-compatible, so few refactoring effort (https://js-soft.github.io/wdi5/#/locators)

Sure, at test-time with wdi5, you have initial start-up effort as a remote-controlled browser-instance is launched; but the option to run tests in parallel in multiple browsers, on multiple OS, will probably soon outweigh the refactoring effort. And this is not even taking into account the additional testing capabilities wdi5 provides (file uploads, network traffic simulation, ...).

christoph_marotzke2
Discoverer
0 Kudos

We would like to run wdi5 with CAP backend. Is there any timeline for wdi5 to work with CAP backend with basic authentication?

vobu
SAP Mentor
SAP Mentor

hey christoph.marotzke2 - mentioned in https://blogs.sap.com/2023/02/22/whats-cooking-in-the-wdi5-kitchen/, it's been sitting in the todo for too long already and keeps being pushed back 😞

Bottom line: getting the CAP basic auth to work requires some change for the authentication sequence as CAP's basic auth happens "later" than the UI being displayed in the browser.

Given that wdi5 is a community-driven Open Source project: would you or one of your colleagues dare to take a shot at it? Some of the core wdi5 contributors could certainly walk you through the implementation steps required. What do you think?