Deprecated: Creation of dynamic property Pusher\Log\Logger::$file is deprecated in /html/wordpress/wp-content/plugins/wppusher/Pusher/Log/Logger.php on line 18
Deprecated: Creation of dynamic property Pusher\Log\Logger::$file is deprecated in /html/wordpress/wp-content/plugins/wppusher/Pusher/Log/Logger.php on line 18
Deprecated: Creation of dynamic property Pusher\Dashboard::$pusher is deprecated in /html/wordpress/wp-content/plugins/wppusher/Pusher/Dashboard.php on line 68
Deprecated: Creation of dynamic property Pusher\Log\Logger::$file is deprecated in /html/wordpress/wp-content/plugins/wppusher/Pusher/Log/Logger.php on line 18
Deprecated: Creation of dynamic property Pusher\Log\Logger::$file is deprecated in /html/wordpress/wp-content/plugins/wppusher/Pusher/Log/Logger.php on line 18 wdi5 Archives - j&s-soft
Die TechEd 2022, die große SAP Jahresveranstaltung, fand am 15. und 16.11. in Las Vegas statt. Bei der TechEd stehen technische Innovationen bei der SAP an erster Stelle und so ist die Veranstaltung vor allem für die Entwickler, Architekten und Techniker interessant. Auch unser “Baby”, das Test-Framework wdi5 zum einfachen Testen von UI5-Anwendungen war Thema in Las Vegas. Für uns eine Ehre und Freude.
Testen ist kein Lieblingsthema bei Entwicklern und so brachte es Michelle Moudy von den Developer Advocates bei ihrem TechEd-Vortrag mit den Worten “testing sucks” auf den Punkt. Dennoch ist allen klar: Testen muss sein. Was ist also logischer, als das notwendige Übel zu erleichtern. Dann stellte sie wdi5 vor. Hier geht es zum Video.
Nachdem wir wdi5 entwickelt haben, wird es jetzt als Open Source bei der SAP weiter betreut. Wer über wdi5 hinaus erfahren möchte, welche Neuerungen auf der SAP TechEd 2022 vorgestellt wurden, findet den Guide hier.
Fun fact: Passend zum Veranstaltungsort konnten die Teilnehmer ihren Spieltrieb bei der TechEd mit dem Finden und Sammeln von NFTs befriedigen. Es gab sogar ein Sammelalbum. Panini lässt grüßen.
Beim Devtoberfest, einem Vortragsmarathon für Entwickler im SAP-Umfeld, fließt das Wissen wie das Bier auf dem Münchner Original. Themen sind ABAP, Cloud native, Low Code/No-code, Data and Analytics und User Interface. Mit dabei war auch dieses Jahr unser Kollege Volker Buzek. Er präsentierte das von uns in diesem Jahr veröffentlichte Testwerkzeug wdi5 in dem Vortrag: “Testing UI5 Apps with wdi5: Zero to Hero to Continuous Integration.” Die Aufzeichnung des Vortrags finden Sie hier. Mehr zur Veranstaltung hier.
Wer gleich mehr über wdi5 wissen möchte: Hier der Link zu wdi5 in der offiziellen UI5 Dokumentation.
After the success of the previously released version we wanted to have WDI5 available not just for hybrid mobile application testing but rather for all UI5 applications. Hence we noticed the necessity to separate the UI5 part from the hybrid part of the framework.
Goal
Full independence from the wdi5 “hybrid testing package” with full compatibility to wdio for UI5 browser application testing.
What needed to be done?
The WDI5 monolith needed to be split up. Now the GIT repository has three folders (wdi5, wdio-ui5-service, test) in root location. As the names suggest, wdi5 contains the hybrid testing tool, wdio-ui5-service the Webdriver.IO-plugin and test the tests for both (b/c wdi5 tests itself with wdi5, yeah ????)
Implement an interface so wdi5 can reliably dependend on wdio-ui5-service
Restructure all code to support the wdio service handling with hooks.
Result
To clarify the confusion: There are 2 (in words: two, dos, deux, zwei) Node.js-modules being built from one git repository:
wdio-ui5-service: the Webdriver.IO-plugin
it is independent from wdi5 and doesn’t have any other module dependencies
wdi5: the hybrid UI5-app test module
wdio-ui5-service is required by wdi5 for runtime, meaning you can drive both the browser- and the hybrid-app with wdi5.
Plus: wdi5 is fully backwards-compatible to previous versions.
i Note that usually we refer to both when we’re using the term wdi5. If one of the two modules is explicitly referred to, we try to use the corresponding term
Note that the usage of both is code-agnostic. Meaning, you’re writing the same syntax and tests no matter whether they run via wdio-ui5-service in the browser-scope or via wdi5 in the app-scope!
There’s a “main” README detailing all the usage and test-options you have code-wise.
i Note that we’re proxying through (almost all) methods of UI5 controls so you can operate the control at test-time just as you do during (UI5-)runtime!
The wdi5 module provides all capabilities of wdio-ui5-service – no need for a separate install.
wdio-ui5-service: installation
npm i wdio-ui5-service -d
This package is a 100% dependency free library to span the bridge from wdio to UI5. It is required to add all further dependencies by yourself.
wdio-ui5-service: configuration
...
services: [
"ui5" // yes, that's it!
]
...
Usage
All WDI5 functionality is attached to the global browser object Webdriver.IO provides. To stay API-compliant with UIveri5, we decided to introduce .asControl() as the very first entry point to interacting with a UI5 control:
browser.asControl(<selector>)
a<selector> is also API-compliant with OPA5 as it refers to an object containing the attributes of the desired UI5 control, such as id or controlType:
As you might have noticed, wdi5 inherits sync coding ability from Webdriver.IO, so no need to go async notation-wise:
// ⚡️ ⛔️ no need for this:
browser.asControl(selector)
.then((control) => {
//...
})
.catch(...)
//⚡️ ⛔️ ... or this
let button
try {
button = await browser.asControl(selector)
} catch(err) { ... }
// just pretend as if asnyc's not there ???? - we've got ya ????
browser.asControl(selector).setText("bla").setEnabled(true)
Note that consequently, all non-control actions are also triggered via browser:
browser.screenshot('some-id') // yes, we can do screenshots anywhere :)
browser.goTo({sHash: '#/route'});
Improvements
No manual wdio hook implementation required anymore to setup wdi5
-> starting the tests is even more easy. Literally just three LOC.
Testing of standalone UI5 web-apps using the new wdio-ui5-service module without dependencies
-> separation of concerns having two modules, faster dev cycles