SORMAS-Foundation / SORMAS-Project

SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
https://sormas.org
GNU General Public License v3.0
292 stars 140 forks source link

Investigate BDD layer refactoring and estimate required effort #7833

Closed rdutu-vg closed 2 years ago

rdutu-vg commented 2 years ago

Once the new automation team started delivering new tests, we discovered that the BDD layer implemented in the framework is causing a lot of problems in terms of maintainability and reusability, so the number of code lines in BDD/steps classes are increasing. Spent a lot of time with the qa team for each PR to optimise the code and try to make it reusable, but since all the data which can be passed in the cucumber layer (BDD syntax) is related to strings and integer, and no Object or Class can be used, limits code reusability. The issue was flagged one week ago to all QA automation members and their manager, Alwin, and in order to refactor the framework, I need to investigate and try to provide an effort. The following need to be checked in order to provide an estimation:

  1. Remove courgette/cucumber
  2. Refactor core runner from cucumber to testng
  3. Log results into Allure report from testng execution
  4. Refactor all feature files into java classes
  5. Refactor steps/bdd methods to make them reusable
  6. Rewrite tests with the new methods
rdutu-vg commented 2 years ago

With the current gradle project we can't implement any other runner to keep the allure report. Looks like there is a big problem with gradle-testng-allure implementation, so to proceed with this we would need first to create a new maven module and move by hand all dependencies and implement the new needed ones. Then, we need to move all classes and refactor the entire core with all injected classes, step listeners for allure, hooks etc.

In conclusion, it's a huge effort, totally worth it, but hard to be done by a person.