Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Export Filtered Test Cases


#1

Is there a way to export only the test cases I filter on? I cannot find an option like this. It exports the entire TestRail Test Case Library.


#2

Hello,

Thanks for your posting. The exports (XML, CSV/Excel) currently export all test cases/tests (it’s already planned to support the filters though). That said, the upcoming version of TestRail (4.1) will add new features to the CSV/Excel exports, including limiting the export to select sections, for example. This might already help depending on your use case. You can also look into filtering the files yourself after creating the export (e.g. in Excel or by post-processing XML exports). We are happy to help in case you would have any questions about this.

Regards,
Tobias


#3

[quote=tgurock]Hello,

Thanks for your posting. The exports (XML, CSV/Excel) currently export all test cases/tests (it’s already planned to support the filters though). That said, the upcoming version of TestRail (4.1) will add new features to the CSV/Excel exports, including limiting the export to select sections, for example. This might already help depending on your use case. You can also look into filtering the files yourself after creating the export (e.g. in Excel or by post-processing XML exports). We are happy to help in case you would have any questions about this.

Regards,
Tobias[/quote]

When will the 4.1 release? Thanks.


#4

Hello Alston,

The new version is now available (for both TestRail Hosted as well as TestRail Server). You can learn more about the new version on our blog:

http://blog.gurock.com/?p=3076

Please let us know in case you have any question or feedback.

Regards,
Tobias


#5

This is still not working in version 5.0.0.336.

How do I export a filtered list of test cases? Currently TestRail is still exporting the entire test case repository.


#6

Hello Kevin!

TestRail currently always exports the entire case repository and includes all case details. Starting with TR 4.1, the CSV export includes a section filter which lets you limit the export to select sections. The exports also include all case details so you can filter and post-process the exports outside of TestRail as needed. We are happy to help in case you have any questions or need help with customizing the exports.

I hope this helps and I look forward to your reply!

Regards,
Tobias


#7

Why does the XML export not support this filtering?


#8

The exports always include all case/test details but you can post-process and/or filter them independently of TestRail as needed. I can recommend the XML format if you plan to post-process the exports but the CSV files also work great in this case.

Regards,
Tobias


#9

I’m finding the recommendation to put all test cases into a single repository… bad.

It appears that TestRail has very poor support for filtering or extracting information for subsets of the repository.

If you support exporting filtered test cases in CSV, why do you not support it for XML? I use TestRail so I don’t have to jump through hoops and use other platforms/software.


#10

Hi Kevin,

Thanks for your feedback. The filtering support on the test suite / case repository as well as test run pages is actually quite strong and you can filter based on system and custom fields and also show cases for select sections only:

You can also change the grouping and ordering from the default section mode to another attribute (e.g. priority, type, custom fields, etc.). It’s just that the exports currently always include all cases but we will make sure to review this again for a future version. Thanks again for your feedback on this!

Cheers,
Tobias


#11

Your filtering is strong, but the implementation is poor.

It is extremely difficult to filter off sections, because you only show the FULLY expanded section list - you need to add an option (perhaps default) to collapse the sections.

TestRail suggests you use a single repository - okay, sure. Sounds good.

So I have all my tests organized in a single repository, with lots of sections and subsections for organization.

So then I try to filter off a section, export a section, run a report on a section, etc. - which is where we have an issue. I have to scroll through EVERY section and subsection I have generated to find the one I am looking for. Then I have to individually select all sub-sections. Not user friendly.

The UI for your filtering needs a revamp, you also have scroll windows in scroll windows - that’s a no-no.


#12

Thanks, Kevin, really appreciate the feedback! We will definitely make sure to look into this for a future version. It might make sense to provide the section filter independently of the regular attribute filter and maybe move it to/integrate it with the sidebar tree on the right instead (and also improve the section filter on the report pages).

Cheers,
Tobias


#13

would be great if you can change the export to export filtered cases instead of always include all cases
Also do you have any plans to expose API’s for reports?


#14

Thanks for your feedback, Irina!

Yes, there are already plans for an API for the reports and I’m happy to add another vote. Scheduling/creating reports via the API, for example, has been requested before and we would like to look into this for a future version.

Cheers,
Tobias


#15

Hi, do you think these suggestions regarding filtering etc will be implemented anytime soon? I’m fully agreeing that your filtering implementation is really weak. Especially sections. I also can’t find a way to filter tests which are in a particular test run/s


#16

Hi @eraserwke,

Thanks for your posting. We currently don’t have an estimate or time frame but it’s planned to revisit some of the filters and support filters in other locations (exports/prints). Regarding the tests: can you provide a few more details on this one? I’m sure there’s already a report (like the comparison reports) that allows you to find the tests in test runs.

Cheers,
Tobias


#17

I’m looking for a way to filter and edit all the test cases which are in a
particular test run. Not results. But I need to edit 1 field in all of
them. What’s the easiest way to do this?


#18

You can use the comparison for cases report to find the cases but it’s currently not directly possible to edit those fields. One option is to generate the report and then have the case repository open in a second tab and then check the checkboxes and use the bulk-edit feature to update those cases.

Cheers,
Tobias


#19

Hi, thanks for your reply. Unfortunately your suggestion involves a whole lot of manual work and eyeballing which is really what we want to avoid when using a test management tool. It’s not a viable option when our test runs involve hundreds or thousands of test cases.

Can we do something like this via the API?


#20

Yes, you could automate this with the API. get_run and get_tests would return details about a test run and the included tests which helps with finding the case selection. You can then use add_run with a custom case selection (include_all = 1 and case_ids) to start a new test run:

http://docs.gurock.com/testrail-api2/start

I hope this helps!

Cheers,
Tobias