Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1602

TestNG test methods not discovered if they are private

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Fix
    • open-source
    • Test Optimization
    • None
    • Clover 4.0.2
      Ant 1.8
      Java 1.8
      TestNG 6.8.7
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      If a TestNG test method is private:

      public class TestClass
      {
          @Test
          private void testSomething() { /* ... */ }
      }
      

      then TestNG recognises the method as a test method and will run it, but Clover does not recognise it as a test method during the instrumentation phase. This results in all such test methods being run during an optimized test run.

      Workaround: Make all such methods public.

      Related Clover documentation: https://confluence.atlassian.com/display/CLOVER/Clover+test+detection

      Attachments

        Activity

          People

            Unassigned Unassigned
            0f30c17ea152 Mitchell Archibald
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: