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. Read on for all the details.
Code challenges are all about having fun, trying new things, and learning along the way. For this code challenge we invite you to explore and get familiar with wdi5, which will be UI5’s official end-to-end testing framework in the future. It navigates through and uses UI5 applications “like a user would” by opening windows, clicking controls, and typing input. It’s a great tool to know and really fun to explore.
We have set up a starter project that contains an empty OpenUI5 application and a series of end-to-end tests written with wdi5. To take part in the challenge it is your job to develop an OpenUI5 app and make the tests pass. The challenge follows the process of test-driven development.
We have set up a SAP Community Code Challenge – Testing UI5 Apps with wdi5 thread in the Coffee Corner, where we invite you to discuss and share your results of the challenge.
The starter project is available on GitHub: https://github.com/SAP-samples/sap-community-code-challenge-ui5.
The challenge itself is pretty simple: The only requirement is to build a working OpenUI5 application and make the pre-written wdi5 tests pass. There are no requirements in terms of what your application must look like or its content, as long as it passes the tests. Feel free to get creative and build the application you always wanted to build, but don’t edit the tests 😉
We want to keep the challenge fairly loose, which is why there are no prizes. However, interesting challenge entries may be highlighted in upcoming posts, videos or live streams by the Developer Advocates, and of course will be appreciated by the SAP Community members.
Participating in the Challenge
You will have to follow these steps to take part in the challenge:
- Fork the repository.
- Clone the forked repository into your development environment.
- Execute npm install to install the project’s dependencies.
- Execute npm start to start the web server.
- Read the tests and try to understand what they test for. What kind of pages and controls do they expect?
- Develop the OpenUI5 app to make the tests pass (execute npm run test to run the tests locally during development).
- Once the tests pass (see below screen shot), push your changes to your forked repository on GitHub.
- Open a pull request to the base repository. This will automatically trigger the execution of the tests via a GitHub Action.
- Copy the URL of your pull request and paste it into the SAP Community Coffee Corner thread to submit your challenge entry. Share your learnings and experience with fellow SAP Community members.
Now comes the exciting part. We will introduce a new test file on Wednesday every week for the next four weeks and update the main branch accordingly. The file for week one is already there at the start of the challenge. You can already start exploring it. Also feel free to provide a pull request as soon as you make the tests pass. The later you start the challenge, the harder it will be to make all the tests pass 😉
This is the detailed timeline:
- June 8th, 2022 (10:00am CEST) – Start of the challenge
- June 15th, 2022 (10:00am CEST) – Uploading of new test file week2.test.js
- June 22nd, 2022 (10:00am CEST) – Uploading of new test file week3.test.js
- June 29th, 2022 (10:00am CEST) – Uploading of new test file week4.test.js
- July 6th, 2022 (10:00am CEST) – End of the challenge
Get your submission in by July 6th, as we will start picking out the ones that we want to highlight on that date.
Let’s Get Started
We are looking forward to seeing what you will build and wish you a lot of fun.
▶️ Head over to the SAP Community Code Challenge – Testing UI5 Apps with wdi5 thread in the Coffee Corner to discuss, share, and see what others SAP Community members have built.
- wdi5 documentation
- Example application that is used to test wdi5 itself
- Introduction to wdi5 at UI5ers live by Volker Buzek
I tried the steps and able to create the test script but not able to run the config.js file.
Could you please share the steps to run.
Thanks in advance.
you can run the tests with npm run test from the root of the repo.
Check out the instructions in the GitHub repo for more info.