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

Coverage Question #263

Open
xmq-111 opened this issue Dec 28, 2024 · 1 comment
Open

Coverage Question #263

xmq-111 opened this issue Dec 28, 2024 · 1 comment

Comments

@xmq-111
Copy link

xmq-111 commented Dec 28, 2024

When I use JQF-2.1 to test James-3.8.1, I encounter a situation where the coverage information is 0.
`Semantic Fuzzing with Zest

Test name: org.apache.james.jmap.draft.methods.SetMessagesCreationProcessorTest#assertUserCanSendFromShouldThrowWhenSenderIsNotTheConnectedUser
Instrumentation: Janala
Results directory: /home/xmq/Downloads/james-project-3.8.1-source-release/james-project/server/protocols/jmap-draft/target/fuzz-results/org.apache.james.jmap.draft.methods.SetMessagesCreationProcessorTest/assertUserCanSendFromShouldThrowWhenSenderIsNotTheConnectedUser
Elapsed time: 3s (max 10s)
Number of executions: 95,009 (no trial limit)
Valid inputs: 0 (0.00%)
Cycles completed: 0
Unique failures: 3
Queue size: 0 (0 favored last cycle)
Current parent input:
Execution speed: 31,971/sec now | 25,595/sec overall
Total coverage: 0 branches (0.00% of map)
Valid coverage: 0 branches (0.00% of map)
Fuzzing stopped due to guidance exception: Too many trials without coverage; likely all assumption violations
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.520 s
[INFO] Finished at: 2024-12-28T15:00:57+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal edu.berkeley.cs.jqf:jqf-maven-plugin:2.1-SNAPSHOT:fuzz (default-cli) on project james-server-jmap-draft: Internal error: Too many trials without coverage; likely all assumption violations -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
`

@rohanpadhye
Copy link
Owner

You can see the error message: Too many trials without coverage; likely all assumption violations and 3 unique failures in the status screen. You likely have assumeTrue() statements where the predicate is always false (i.e., no randomly generated input is satisfying the predicate) or some assumption in your input generator that is never true.

You can debug by running mvn jqf:repro with the input files saved in the failures directory, and seeing what the error stack trace looks like. Maybe also add some print statements at the start of your test method to see what your inputs look like in order to debug the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants