Skip to content

Conversation

jakobcodes
Copy link
Contributor

Description

This PR enhances the JUnitRunner by adding support for method-level test filtering. The implementation allows for more granular control over test execution by enabling filtering of individual test methods, rather than just entire test suites.

Changes

  • Added method-level filtering capability to JUnitRunner
  • Introduced excludedTests tracking mechanism for filtered test methods
  • Implemented filter logic using ScalaTest's tagging system

Implementation Details

  • Uses a mutable Set to track excluded test methods
  • Leverages ScalaTest's DynaTags for runtime test filtering
  • Properly handles empty test scenarios with NoTestsRemainException

Copy link

cla-bot bot commented Dec 2, 2024

Hi @jakobcodes, we require contributors to sign our Contributor License Agreement, and we don't have yours on file. In order for us to review and merge your code, please access https://www.artima.com/cla/choose-type to sign our Contributor License Agreement. Your effort is highly appreciated. Thank you.

@artimasites
Copy link

@cla-bot[bot] check

@cla-bot cla-bot bot added the cla-signed label Dec 2, 2024
Copy link

cla-bot bot commented Dec 2, 2024

The cla-bot has been summoned, and re-checked this pull request!

@MajaSt1
Copy link
Contributor

MajaSt1 commented Jan 14, 2025

Hi @cheeseng, when you have a chance, it would be great if you could review the changes in this PR 🥇

@SethTisue
Copy link
Contributor

oooooohh, this looks really appealing

@cheeseng
Copy link
Contributor

Hi @jakobcodes , @MajaSt1 @SethTisue , sorry somehow I missed this one, overall I think the PR looks fine, with possible minor improvement I would suggest:

  • May use AtomicReference for mutable.Set
  • May use tag name "org.scalatest.Selected" instead of "Included".

Sorry again for missing this one, let's request @bvenners to review for approval.

@cheeseng cheeseng requested a review from bvenners January 25, 2025 13:49
…ns and tag tests with "org.scalatest.Selected"
Copy link

cla-bot bot commented Feb 25, 2025

Hi @MajaSt1, we require contributors to sign our Contributor License Agreement, and we don't have yours on file. In order for us to review and merge your code, please access https://www.artima.com/cla/choose-type to sign our Contributor License Agreement. Your effort is highly appreciated. Thank you.

@cla-bot cla-bot bot removed the cla-signed label Feb 25, 2025
@artimasites
Copy link

@cla-bot[bot] check

@cla-bot cla-bot bot added the cla-signed label Feb 25, 2025
Copy link

cla-bot bot commented Feb 25, 2025

The cla-bot has been summoned, and re-checked this pull request!

@MajaSt1
Copy link
Contributor

MajaSt1 commented Mar 7, 2025

Hi @bvenners, when you have a chance, it would be great if you could review the changes in this PR

@cheeseng
Copy link
Contributor

Trying to close the PR to be re-opened to re-trigger CI build.

@cheeseng cheeseng closed this Mar 17, 2025
@cheeseng cheeseng reopened this Mar 17, 2025
@cheeseng cheeseng merged commit ad5ec23 into scalatest:main Mar 17, 2025
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants