-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement import and export for manual tests #202
Comments
@hegerj, interested to look into this? |
I would propose to consider storing test phases (setup, ...) in a separate files in git and reference these file instead of describing the step in fmf file directly. I can imagine that some test could be large, also including code snippets etc. and describing it in the fmf file in yaml could be difficult for the user. Moreover, such approach would easy test case export from TCMS/NITRATE. |
While I agree about fmf files being cluttered with these new data I am also not sure extra files are the best solution. It would mean user couldn't just open on file with all metadata which would also worsened user friendliness. I don't understand what you mean with that last point @kkaarreell . |
Test steps are not metadata, such as commands inside runtest.sh are not metadata. Regarding the last point, Nitrate/TCMS TCs consist of "Setup", "Actions", "Breakdown", "Expected result". I am proposing storing fields content in separate text files and only referring those filenames from setup/step/expect/cleanup fmf sections - well, there is not 1-1 mapping so the export would have to adjust them a bit. |
Well, one of the main points of moving to I can imagine we could extend the spec in the future to allow referencing external files as well. It could look like this:
For now I'd suggest we keep it simple, everything in a single fmf file to move forward with the implementation and extend the functionality in the future. Thinking about it a bit more, perhaps this could be an |
Well, that would be highly tool dependent, IIRC in Polarion creating a test case could be more complex (multiple steps), definitely not one field. Even in Nitrate it is not one field but four. Similarly, github/gitlab lets you to edit the code in WebUI and you won't call it test metadata. So no, manual test steps are not test metadata, this is the test itself. Anyway, my point was not having manual instructions in yaml format as you don't really know what is the format of original data in Nitrate (well, it is some rich text but people tend to mix instructions and code snippets). |
Even with |
I guess that attribute would be used only in very small portion of fmf tests. The above still stands (in general). |
@lukaszachy @Athwale What do you think about this issue? |
I looked at a couple of random manual test cases in nitrate. |
First - How user friendly should it be to use manual tests outside of the tmt command? What would you say if
We will loose 'elasticity' of manual steps, but using that is a 'vendor lock-in' to fmf.
|
I second that. Honestly, short manual tests are in many cases poorly described manual tests. I like the markdown idea, though it raises a question what to do if the document syntax won't be correct. Eventually, with defined skeleton you may still be able to parse individual steps and serve them to the user when running the test from the console (e.g. by converting md snippet to text using pandoc or printing md directly). I think I would actually support both in the end, plain text and markdown. |
Thanks for the idea. Sounds interesting at the first sight. But when I was thinking about it a bit more here are some thoughts which vote against it:
Not that I would be strongly against the proposal, but so far I do not see advantage here. |
Please do not place ease of implementation before user experience. If you have longer description of manual case, would you really prefer to read it as an unformatted string in yaml? Computers are for people, not the other way.
I don't think this example, which from my PoV not easily readable without being processed by fmf is worth locking user to fmf and yaml.
We will. But my point is readability.
Import is one time event. From there on we will be creating new cases under tmt. |
I'm not advocating against user experience. Perhaps just prefer plain text with structure which usually covers 90% of my needs. But I understand there can be more complex manual test scenarios. On the other hand, I think
To get the whole test data
This is probably a matter of taste. But I see your point. Creating new manual test cases using But the main point: For infra services this seems to be a blocker for mass-migration of their tests to git. I would like to find a solution soon. So let's move forward. Could you please prepare a pull request with updated specification and examples (see #198) showing how this would work with the external markdown document? |
I would repeat myself. Manual test cases often contain snippets of code, configuration etc. I can't imagine storing such data in yaml (esp. if the snippet would contain also yaml) and preserving ease of use and readability. |
We've agreed with @lukaszachy that he will prepare updated specification and examples using referenced external markdown document. Let's continue when we have something tangible. |
I know. I just wanted to support his arguments. :-) |
Let me comment why 'manual' attribute is kept but changed to boolean. We have required attribute So I propose to keep Filtering can be done by ( |
PR #247 updated, comments more than welcome. |
I have added once comment. Otherwise looks good to me. Btw, how do you propose to implement export of manual TCMS TCs to the markdown format? |
I'm afraid that due to the free form nature of TCMS it has to be '1. import, 2. edit, 3. export'. So for the initial import:
Export of MD (nitrate) Feel free to raise objections, ideas. I'm not really happy with ignoring Results, but all I could think of was to map Test to both where Expect sections are copied to Results and all what is left to Actions. Might need a separator inside the TCMS if there are more steps/outcomes. However for readability I think whole Test should be in Actions together BTW, I've found out that kiwitcms moved to single text field and advises users to keep text there in given-when-then structure |
The specification update #247 has been merged. @hegerj, we are looking forward to the implementation! :) Regarding the export I basically agree with @lukaszachy, only for the step/expect pairs I would also consider adding them as lists into the respective field. So for example
Would result into something like this in Nitrate:
What do you think? |
I understand Step/Expect as logical, not necessary atomic pairs. The specification doesn't restrict user to use list on their own and it will end with a mess if they do.
|
For the export I would go only with the Step/Result section content and ignore the rest. I mean, take the whole step content and paste it in the Action field. In the above-mentioned example |
@Athwale, @kkaarreell As requesters of manual cases - What is your preference for the export to TCMS? (tl;dr: Can we leave empty Results box in TCMS?:) |
Empty Expected Results: field in TCMS is fine as long as the expected command outputs are visible at least somewhere. I have seen people only use one of the available fields sometimes in TCMS anyway. As for a convert function, currently the tmt test convert works with the cloned test case on your disk. You go in the folder with the test and run the command there. Most manual test cases do not have any files in any git (some do have though), they are only in TCMS. So it will have to work differently here. |
I do not have a preference. My only concern is to have the imported/exported content copied over and readable for the user. |
@hegerj, any update here? Do you plan to work on this in the near future? This is blocking infra services migration. |
Are there any news about this. The deadlines are inevitably approaching at a steady pace and we would like to be prepared. :D |
I've checked with @hegerj today, he's planning to start looking into it this week. |
For reference, |
This issue is being addressed in #319 |
Hint from @tkdchen: For updating manual test case fields |
Based on the outlined specification of manual test data let's implement import/export of manual test cases from/to nitrate. In addition to the attributes defined for the new
manual
attribute, the test key should contain special valuemanual
. For now, manual test cases should be skipped by default when executing tests. In the future we can add a support for semi-automated execution.The text was updated successfully, but these errors were encountered: