question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Display names of parameterized tests in test explorer

See original GitHub issue

Assume we have a pamraterized test test_adding_numbers(a, b). We have parameters [1,2], [2,4], [4,9] The UI will display the nodes as follows: Screen Shot 2019-03-14 at 4 35 31 PM

Personally I believe it needs to be altered to display just the parameters in the child nodes. I.e. why repeat the function name in the child nodes, we’re testing different parameters and as a user that’s what I would like to see.

Here’s the improved version: Screen Shot 2019-03-14 at 4 39 53 PM

/cc @luabud

More examples of before and after with a larger test base (pytest repo): Screen Shot 2019-03-14 at 4 44 49 PM Screen Shot 2019-03-14 at 4 43 07 PM Screen Shot 2019-03-14 at 4 42 58 PM

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brettcannoncommented, Jul 15, 2022

How do we generate the name for each parameterization?

Personally, I’m +1 on dropping the redundant name as I assume we always have something to list as a name for the parameterization.

0reactions
parchedcommented, Jul 15, 2022

I found this really annoying so I’ve implemented this here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Display names of parameterized tests in test explorer #4769
Assume we have a pamraterized test test_adding_numbers(a, b). We have parameters [1,2], [2,4], [4,9] The UI will display the nodes as ...
Read more >
Change test names for parameterized NUnit in VS Test Explorer
You were close with Name("Chrome") . Instead, the property you want to set in the TestFixture attribute is TestName :
Read more >
Visual Studio: Different methods to display unit test - TechNet
Select PlayList, right click in test explorer and select “Add to play list” which will then prompt for a file name. Once this...
Read more >
XUnit Parameterized Tests - Test Case Names are all the ...
XUnit Parameterized Tests - Test Case Names are all the same in the Summary ... integrated Test Explorer display the parameters for each...
Read more >
Writing parameterized unit tests in C# — Run the same test ...
Note that these test results include a separate line for each set of inputs. I've also added friendly display names to several of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found