Build/Test Issues

Not Seeing Batch Category Tests in Test Windows

Started by CoolBreeze on 3,104 views

I have a few hundred tests. My goal is to run the tests overnight. Here's my steps;

1) Run say 3 tests during the day and confirm they are successful.
2) Add <Category("Batch")> to the successful tests.
3) At the end of my work day I'd open NCrunch Tests window.
4) Search for tests with Category = "Batch".
5) Select the Batch group and start the tests.
6) Check on tests next morning.

I've run a few tests, added the category attribute to those tests. I used both Nunit Category and NCrunch Category attributes.

I go to NCrunch Tests window, select Category, Namespace, Fixture, Test, then enter Batch into search box.

NCrunch doesn't show any tests.

However, if I search for tests by test name then the tests by the name will show up and a category named Batch shows up.

I'm thinking I must have overlooked enabling or disabling something in the display\search dialog box that's preventing NCrunch from showing the Batch category.

Also, I've added multiple Category attributes to the same test. I'm not sure if multiple categories on the same test presents a problem or not.

I've tested with only one category, Nunit or NCrunch.

Thanks,
Ed

Hi Ed,

Thanks for posting.

The search options in the Tests Window are currently limited to just the test name. It's pretty basic search system and we're looking at giving it a major overhaul soon, because it just isn't powerful enough to handle scenarios like this.

To find your tests, the best way is to do the following:

1. Adjust the filters, so you're showing passing tests and failing tests in the Tests Window
2. Set your grouping mode to 'Category, Namespace, Fixture, Test'
3. Sort the tests by the Name column
4. Find the category (root node in the tree) for 'Batch'
5. Expand the tree as necessary

The grouping does work with multiple categories, so tests can be represented multiple times in the tree.

Post a reply

Log in to reply.