Showing results for 
Search instead for 
Did you mean: 
SAP Community Log-in Update
In a few months, SAP Community will switch to SAP Universal ID as the only option to login. Don’t wait, create your SAP Universal ID now! If you have multiple S- or P- accounts, use the Consolidation Tool to merge your content. Get started with SAP Universal ID now!

SAP Community Code Challenge - Testing UI5 Apps with wdi5

We have a new code challenge for you as part of the Community Spotlight for the month of June. This time it's about testing UI5 apps with wdi5. Check out the corresponding blog post explaining all the details of the challenge, how to take part, and how to submit your entry.

This thread is the place to share your experience with the challenge and what kind of app you are building. Feel free to ask any questions (technical or non-technical) and leave your comments. Also feel free to post a link to your pull request as your challenge entry.

We are very much looking forward to your ideas and contributions! 😃

Galactic 1
Galactic 1

My Entry with a minimal app to pass tests for week1, nothing fancy 🙂


I also submitted my entry for week1, who can guess what kind of app I am planning to build? Any golf fans out here? ️🏌🏼‍

Galactic 3
Galactic 3

My pull request is ready after passing all the tests, all in green!


Galactic 1
Galactic 1

Here is my Pull Request for my very simple ui5 app. 😃

Pull request updated for week2 code challenge


Hi colleagues! Thanks for the great challenge 👍

Please, find my entry here:

Galactic 2
Galactic 2


We can use the same pull request right?

Is there a way to reduce the output of npm run ci-tests? Loglevel in config did not seem to do much,

As a wish for the next week I would prefer some test cases which are more Fiori Floor Plan oriented. In week 2 the additional Button to navigation is not really best practice if we start with a list 🙂

Hi there!

Sorry for the late reply.

Yes, you can use the same PR. 
There are two places in the wdio.conf.js where you have to set the logLevel (one global config and one wdi5 specific), make sure you set them both to 'silent'.
Thanks a lot for your suggestions and feedback. You are right, the app we are building here doesn't follow best practices. It was more important to us that it was 'easy to start with' and that people would get familiar with wdi5 in the first place, and I think that was achieved 😉 

Pull request updated for week2 

Updated for week 3... not sure where this thing is going. I hope to see some back & forth navigation testing for duplicate IDs 😉


Interesting idea with the todo list, let's see if you'll tick all the boxes 😉

Week 2 submitted


Week 3 Summited


I wouldn't use control.firePress() to simulate a user click. Some controls expect parameters in the firePress internal UI5 method. Why not using .click instead and let UI5 fill these parameters ?

I agree.

Hi @ArnaudBuchholz, good idea, thanks for the suggestion. There is also a press() method provided by wdi5 that calls click() under the hood so you can use it on combination with wdi5 selectors (see wdi5 documentation). I will keep this in mind for future projects 🤙

Galactic 2
Galactic 2

Hi @nicoschoenteich 

Week 1,2,3

I have idea for the next challenge. It is a Typescript in Sapui5. Maybe it will be interesting for me and some community members(I think)

Hi @askarpov1, definitely a great idea. More content on TypeScript in UI5 will come in the future 🤙


It looks like week4 tests are "empty". In any case, they are passing without change on my PR.

That is correct. The task is to write your own tests (minimum 2) 😉

Galactic 3
Galactic 3

Week3 test "should have button that opens dialog" sometimes passes and sometimes fails. I use fragment and load the fragment asynchronously.


For week4 test, I'm writing the following code, but I sometimes get "navButton.firePress is not a function" error. Same again, sometimes pass, sometimes fail...




    it("Should go back to main page", async () => {
        const navButton = await browser.asControl({
            selector: {
                id: "navButton",
                viewName: Detail._viewName
        await navButton.firePress()
        const url = await browser.getUrl()




My week4 code here.

I have the same issues you've described. I had to add this "dummy" test with the browser title to give it some timeout:

As I've seen in the browser, detail page doesn't have enough time to be opened. Looks like await doesn't actually wait until the page is fully rendered.

Hi @iklopkov and @miyasuta,
I also observed something similar a while back ( Can you maybe try and remove id="app" and see what happens? Would be interesting to see if this is the same issue.

Hi @nicoschoenteich ,

Thank you for your response. I have tried removing id="app" from App.view.xml, but as my Main view is embedded into App view, this broke navigation and the page is not properly displayed.

Of course it that brakes navigation... My bad.

Hi @nicoschoenteich, I've tried that, but it also broke the app navigation.

I think I found what's wrong: should we add await here?

Hi @iklopkov,

Thank you for the solution provided. It worked for me, too.