Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method-level test filtering support to JUnitRunner #34

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jakobcodes
Copy link

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

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!

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.

5 participants