Project

General

Profile

Actions

action #109810

closed

coordination #109569: [epic][qe-core] Unify PHP Testing

[qe-core] PHP tests unification

Added by pherranz over 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Refactor/Code Improvements
Target version:
Start date:
2022-04-11
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

Problem description

Right now, all the PHP tests are set in the main_common.pm module, for the functional versions and in mau-webserver.pm for the maintenance ones. Also, there are dedicated modules duplicated depending on the distro version (php7_mysql.pm and php8_mysql.pm) for example.

Proposed solution

The idea is to extract all the PHP tests to a brand new created testsuite called php_tests for example, and make them completely generic to avoid code duplication. This way, instead of having two diferent modules with the same code and having the schedule to decide which of them execute, we will have a single file (php_mysql for example) and inside it the version of PHP to use will be decided. Something like this is already being done in the module php_pcre.pm:

if (is_leap('<15.0') || is_sle('<15')) {
    $php = 'php5';
}
elsif (is_leap("<15.4") || is_sle("<15-SP4")) {
    $php = 'php7';
}
else {
    $php = 'php8';
}

Further improvement

As it's intended to make more intense tests due to the inclusion of Laravel, much more modules can be added to this testsuite in order to check for all the framework requirements.

Actions #1

Updated by szarate over 2 years ago

  • Tracker changed from coordination to action
Actions #2

Updated by szarate over 2 years ago

  • Category set to Refactor/Code Improvements
  • Status changed from New to Workable
  • Target version set to QE-Core: Ready

Pablo is working on this directly as follow up to #100940

Actions #3

Updated by szarate over 2 years ago

  • Subject changed from PHP tests unification to [qe-core] PHP tests unification
Actions #4

Updated by szarate over 2 years ago

Is the status of this ticket current? any updates? can we resolve the ticket?

Actions #5

Updated by szarate over 2 years ago

  • Priority changed from Normal to Low
Actions #6

Updated by szarate over 2 years ago

  • Sprint set to QE-Core: April Sprint (Apr 13 - May 11)
Actions #7

Updated by pherranz over 2 years ago

I think the code for this is almost done. I'll run some VR's ASAP and then I'll open a PR.

Actions #8

Updated by pherranz over 2 years ago

By now, the module "web-scripting-module" is not included by default in the SLE instalations available in openQA, so there's need to create a new install with AutoYAST for this new testsuite.

In the meantime, as a workaround, all the new tests can replace the current ones in the current schedules.

Actions #9

Updated by szarate over 2 years ago

  • Sprint deleted (QE-Core: April Sprint (Apr 13 - May 11))
Actions #10

Updated by pherranz over 2 years ago

  • Assignee deleted (pherranz)
Actions #11

Updated by pdostal about 2 years ago

  • Status changed from Workable to In Progress
  • Assignee set to pdostal
Actions #12

Updated by pdostal about 2 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF