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.

Telling tests with duplicate names apart

See original GitHub issue

Printers like beforeEach and passed accept test names which specify the tests. When using this technique it’s not always possible to tell the tests apart, e.g. when tests don’t have a name at all (thus, null is passed to printers) or duplicate names are allowed and used.

From a glance, passing FlatTest instances instead of the names could solve this problem as it’d be possible to inspect the inner TestCode fields and the test names would still be accessible as well. However, it’s possible to use the same test code inside different test cases so still leaves a chance of ambiguity. It seems assigning a unique id to each flat test in toTestCodeList could solve it. Another printer accepting a list of flat tests to run could be added as well.

If we’re to change the printers and flat tests this way it’d be quite a serious breaking change, though, it seems it could fix all ambiguities in printers.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
auduchinokcommented, Sep 19, 2019

You mean feedback on Expecto support, when it arrives, right? It’s probably going to appear in a some later EAP build (we haven’t shipped any for 2019.3 yet actually), I’ll be eager to get it then. I’ll let you know when there’s anything to test available. 😉

0reactions
hafcommented, Sep 16, 2019

Do you want to get feedback? I have rider installed, and am obviously using Expecto.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Pandas - finding duplicate names and telling them ...
Some people will have the same name, and these can be told apart by their 'People ID'. I start by making the 'Name'...
Read more >
Feature Request: Detect duplicate test names · Issue #1633
Duplicate test aren't detected. Possible Solution. See expected behaviour.
Read more >
Should I duplicate tests for convenience overloads?
If I duplicate tests, then I have clashing names without introducing some oddball naming convention. How do you handle this if you duplicate...
Read more >
3 Patterns for Reducing Duplication in Your Unit Tests
Excessive duplication is indicative of test code that is lacking structure. Developers write tests by finding a similar test from which to copy- ......
Read more >
How to deal with duplicate fields - Katalon Studio
Hi, I've run into an issue where I have two of the same fields on the same page and katalon is unable to...
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