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.

Allow functionality of Suite, Parameterized and BlockJUnit4ClassRunnerWithParameters to be reused in custom Runners

See original GitHub issue

As of version 4.12 there is much encapsulated functionality in Suite, Parameterized and BlockJUnit4ClassRunnerWithParameters, which is hidden in private methods and not available for custom implementations of Runner for reuse.

I find it very interesting to implement a parameterized Suite. But since accessing the code of the already existing classes is not possible, I’d have to copy a lot of private methods from there. Instead I’d like to refactor the classes and make this functionality publicly available via static methods, e.g. from Parameterized: public static allParameters(TestClass).

If I prepare a pull request for these changes, would it be accepted by the team? Does is make sense at all in regard to the upcoming release of JUnit5? When will JUnit 4.13 be released?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
kcooneycommented, Jul 17, 2016

@PeterWippermann I couldn’t find most of the methods you wanted to extract. Why don’t you send us a pull where you just change them to public static methods, and we’ll see which ones make sense to make visible externally and where they belong?

0reactions
PeterWippermanncommented, Oct 4, 2016

For the period before this issue can be solved, I set up a project that provides exactly this functionality and makes it available for reuse: https://github.com/PeterWippermann/parameterized-suite

Read more comments on GitHub >

github_iconTop Results From Across the Web

junit - how to combine @RunWith with ... - Stack Overflow
It doesn't have to extend BlockJUnit4ClassRunnerWithParameters . This feature is designed for reusing existing runners without modifying them.
Read more >
org.junit.runners Class Parameterized
The custom runner Parameterized implements parameterized tests. When running a parameterized test class, instances are created for the cross-product of the test ...
Read more >
Parameterized tests - ServiceNow Docs
Enable Automated Test Framework (ATF) properties ... Supported features and metadata in custom templates.
Read more >
How to Parameterize Python Tests Using Pytest
Passing Arguments to Fixtures and Test Functions ... pytest offers mechanisms to reuse testing functions and objects created as part of a ...
Read more >
NUnit Tutorial: Parameterized Tests With Examples
NUnit is one of the widely used C# test frameworks for cross browser testing as it is compatible with the Selenium test suite....
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