Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Run tests on class does not take inherited methods into consideration

Open
#435 21 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
testing

Research direction

Start with FreemarkerTemplateEngineRenderingTest.java and its superclass AbstractTemplateEngineRenderingTest.java, then run the reproducer to confirm that only the subclass's two tests execute. Trace the Java test discovery entry point and verify that inherited @Test methods are included; done means the superclass tests also run for the subclass.

Written by the indexing model from the issue text.

Description

ai-triaged bug investigating junit maven test-discovery

When you have a test class with inherited test methods only the methods explicitly marked on the current class gets run. Would have expected it to run all tests.

Example:
https://github.com/jbake-org/jbake/blob/master/jbake-core/src/test/java/org/jbake/app/template/FreemarkerTemplateEngineRenderingTest.java#L40

If you run this only 2 tests are run, none of the @Test from its super class (https://github.com/jbake-org/jbake/blob/master/jbake-core/src/test/java/org/jbake/app/template/AbstractTemplateEngineRenderingTest.java) are run

Dominant language
TypeScript
Stars
340
Forks
173
Avg merge
1d 2h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-java-test

All issues in microsoft/vscode-java-test

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.