Closed sopos closed 9 months ago
Raising priority - for existing users of beaker-wizard it is easier to first run wizard and then import to tmt. Missing custom templates is not good for tmt.
Doing cp -r <old test> <new>
another way to get "templates".
But it would be great if tmt could to that on its own (including adding virtual cases).
I used to use beaker-wizard
because it was able to fill most of the data out of a BZ. Now I simply copy existing test and change things. If the template was just static without any automatic data gathering from BZ/Jira/whatever I would stick with copying old test I think.
This is one of the blockers to provide a comfortable & concise way to create new tests, blocking TT-242. Let's try to implement in 1.28.
@sopos what do you think, could you maybe contribute with this one.
Seems @psss and @lukaszachy have some ideas how it could be done reasonably.
Would be nice if there could be several test cases created from single template. As I create tests for python (which exists as several, parallel installable components) I need to create several test cases. So my workflow at the moment is to have directory with skeleton files (test.sh, main.fmf, python3.fmf, python311.fmf ...) I copy to newly created test directory.
Aaand one note from me, it'd be nice to use Jinja templates for templates, rather than having them hardcoded in tmt.templates
. We can bundle the whole directory structure into tmt package, we can have subdirectories for various types of plans/tests and their skeleton files, etc.
Forwarding an idea from @kkaarreell:
If I may, I think it would be nice to support loading template from URL. A team could store component specific template in a test repository, ensuring it is always up to date.
Sounds like a useful feature to me.
tmt tests create
should be able to use user defined templates similarly tobeaker-wizard -s template_name
where the template is defined in the~/.beaker_client/wizard
It should be possible to provide a template for the test code and the metadata as well, e.g. some basic set of
require
.