Coverage - My methods are tested for sure but Sealights marks them as Untested

Problem

I have tests hitting certain areas of my code for sure but Sealights dashboard marks them as ‘Untested’.

Solution

Verify that the tests are actually calling the methods in question by adding a system console log at the beginning of the method. Java example below:

System.out.println("Sealights: <method name> was called");

 

If the string does not appear:

  • Is the configuration of your tests validated to run against the right server?

  • Is the same bytecode/artifact scanned by Sealights agent and used in the application server for sure?

  • Is there a mocking tool used in this project or specifically in this testing configuration?

  • Is the app behind a load balancer? If yes, is the log missing from all the instances behind the LB?

 

If the string appears, open a Support ticket and provide Sealights with the following:

  • The console output that explicitly shows the method logs with the exact timestamp of the log (and the timezone set on the server)

  • Sealights agents logs from the application server in question in verbose mode (INFO)

  • The CLASS file (Java) or any binary for Sealights to analyze

  • Provide Sealights with a copy of the source code (file or code snippet containing the specific ‘missing’ method)

    • At a minimum, please provide a screenshot of the specific method code and its class definition.

In addition, answer the following questions

  • Can we reproduce the issue in isolation of a single test? This single test can be manual or automated.

    • It is recommended to have a sandbox ready for troubleshooting and reproduction.

  • Is the problem present only on a single specific test stage or is the method marked as untested in several stages?

    • did you/can you test on a different one?