SAP / open-ux-tools

Enable community collaboration to jointly promote and facilitate best in class tooling capabilities
Apache License 2.0
83 stars 34 forks source link

FEATURE - Integration tests with OPA5 for all UI5 based projects #74

Open tobiasqueck opened 2 years ago

tobiasqueck commented 2 years ago

As a developer, I would like to get the boilerplate code for OPA5 tests generated into my UI5 projects, so that it is easier for me to get started with testing.

Description

The main goal is to have a base template containing the boilerplate coding for UI5 projects, so that it can be integrated into other more complex templates for new projects e.g. fiori-freestyle and fiori-elements but also to be reused by others. Furthermore, it should be possible to add OPA tests to existing projects. The template needs to contain all common files/changes and should allow to easily extend the generated content with project specific additions, therefore, it is also part of this feature request to integrate the new template into the fiori-freestyle templates.

Technical Design

Acceptance Criteria

Given I have an existing UI5 application project without OPA5 tests when I execute this new template in the project folder then I have all boilerplate coding for OPA5 testing in the project

Given I have an existing UI5 application WITH OPA5 tests when I execute this new template in the project folder then nothing will be added.

Given I have an empty folder when I generate a Fiori freestyle application into the folder then I have a Fiori freestyle projects with a minimal executable OPA5 test

Tasks

vobu commented 2 years ago

for this (and probably many other) feature, please have a look at the already existing implementation over at easy-ui5. for adding OPA5 page objects and journeys to an existing application, there's already exactly that implemented over at https://github.com/ui5-community/generator-ui5-project/tree/poc/open-ux-tools/generators → "newopa5journey" → "newopa5po" from a community perspective, it would be great to see a re-use (and/or enhancement!) of existing scaffolding functionality instead of duplicating it

tobiasqueck commented 2 years ago

@vobu you are completely right, we do not want duplications of the code. Directly integrating newopa5journey, newopa5po and opa5 from https://github.com/ui5-community/generator-ui5-project/tree/poc/open-ux-tools/generators into the generators of the Fiori tools wouldn't work that easily because we wouldn't need any of the prompting. Similar problem for a possible integration into Fiori tools - Guided development in the future. A yeoman generator is not the ideal level of abstraction for us.

Could we work with you and the community to move the writing part into a reusable module here that can be integrated into easy-ui5, Fiori generators and possibly Guided development?

vobu commented 2 years ago

Could we work with you and the community to move the writing part into a reusable module here that can be integrated into easy-ui5, Fiori generators and possibly Guided development?

absolutely! when implementation is coming up on your side, let's meet up (incl @IObert and @maximnaidenov, eventually @petermuessig and possibly @osigge and @marianfoo) and align APIs 👍

IObert commented 2 years ago

CC @tsaleksandrova