Bug 1184907

Summary: [RFE] allow custom test types
Product: [Retired] Beaker Reporter: Iveta Wiedermann <isenfeld>
Component: command lineAssignee: Roman Joost <rjoost>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 19CC: aigao, azelinka, dcallagh, dowang, ebaak, fholec, optak, rjoost
Target Milestone: 21.1Keywords: FutureFeature, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-21 03:25:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for custom test type
none
Updated version of custom test types none

Description Iveta Wiedermann 2015-01-22 12:34:14 UTC
Description of problem:

After some discussions in BaseOS QE we found out we don't want to use test types like Sanity/Regression... anymore in git (and our tests) and we decided it would be much better to structure tests according to their functionality. 
Example:

wget
    http
        test1
        test2 
    ftp
        test1

would produce tests /CoreOs/wget/http/test1 etc.

beaker-wizard must be updated so it does not make people to choose some predefined test type, you may choose whatever you want instead. But there must be preserved backward compatibility of course. Wizard still may offer tip with test types we are used to use now.

More information related to this topic: https://engineering.redhat.com/trac/apps/ticket/9

Comment 1 Nick Coghlan 2015-01-27 07:13:18 UTC
This change will solve a usability issue with non-RH Beaker installs as well, where the default set of test types has long been specific to Red Hat QE.

Comment 3 Filip Holec 2015-04-20 13:45:08 UTC
Created attachment 1016381 [details]
Patch for custom test type

(In reply to Filip Holec from comment #2)
> Working on it, hopefully it will be matter of a hours.
matter of a *few* hours.

It seems like there are some issues (most likely related to permissions) with current gerrit instance on http://gerrit.beaker-project.org/. I'll push the changes to git when it's working.

Comment 4 Dan Callaghan 2015-05-04 00:45:41 UTC
Pushed to Gerrit:
http://gerrit.beaker-project.org/4196

Comment 5 Filip Holec 2015-05-04 08:59:40 UTC
Hi Dan,

there are still some tweaks that should be implemented after last brainstorming about custom types.

Is it possible to push the new commit to the 20.2 version?
I suppose the patch would be ready by the end of this week.

Filip

Comment 6 Dan Callaghan 2015-07-06 06:12:29 UTC
This can go into a Beaker release as soon as it's ready. The patch is just missing tests right now.

Comment 7 Roman Joost 2015-08-23 23:15:56 UTC
Re-scheduling this item to be looked after ASAP so we can call it done.

Comment 8 Filip Holec 2015-09-01 10:48:45 UTC
Created attachment 1068938 [details]
Updated version of custom test types

Patch for custom test types, no tests present yet.

Comment 9 Roman Joost 2015-09-17 03:37:22 UTC
I'll take care of the new patch.

Comment 10 Roman Joost 2015-10-01 03:58:59 UTC
Merged into the repository from:

https://gerrit.beaker-project.org/#/c/4402/

Comment 11 Dan Callaghan 2015-10-09 05:15:15 UTC
This bug fix is included in beaker-client-22.0-0.git.44.6fb2db0 which is currently available for download here:

https://beaker-project.org/nightlies/develop/

Comment 12 Dan Callaghan 2015-10-11 23:45:11 UTC
While looking at the new test beaker-wizard test cases I noticed a problem with this patch.

The existing behaviour of beaker-wizard if a path is given, is to try and guess values based on the number of path components. The man page [1] explains:

> The testname argument should be specified as:
> 
> [[[NAMESPACE/]PACKAGE/]TYPE/][PATH/]NAME
> 
> which can be shortened as you need:
> 
> TESTNAME
> TYPE/TESTNAME
> TYPE/PATH/TESTNAME
> PACKAGE/TYPE/NAME
> PACKAGE/TYPE/PATH/NAME
> NAMESPACE/PACKAGE/TYPE/NAME
> NAMESPACE/PACKAGE/TYPE/PATH/NAME

However, the only way that it can distinguish between the TYPE/PATH/TESTNAME and PACKAGE/TYPE/NAME cases is because the TYPE is expected to be from a fixed list of allowed test types. For this bug the regexp for the TYPE segment was patched to match anything, which means that only the PACKAGE/TYPE/NAME case is matched.

I think we can tweak it so that the existing guessing behaviour is preserved, while still allowing any test type when explicitly requested.

[1] https://beaker-project.org/docs/man/beaker-wizard.html

Comment 13 Dan Callaghan 2015-10-12 00:26:06 UTC
http://gerrit.beaker-project.org/4429

The name parsing logic is a bit longer now but I think it's probably still easier to read than the big regexp pattern which was there before...

Comment 14 Dan Callaghan 2015-10-15 04:45:42 UTC
This bug fix is included in beaker-client-21.1-0.git.22.2791295 which is available for download here:

https://beaker-project.org/nightlies/release-21/

Comment 16 Dan Callaghan 2015-10-21 03:25:37 UTC
Beaker 21.1 has been released.