Errors occur when run coverage test

Answered

"C:\Program Files\Java\jdk1.8.0_91\bin\java.exe" -ea -javaagent:C:\Users\Tory\AppData\Local\JetBrains\IntelliJIdea2021.1\testAgent\intellij-coverage-agent-1.0.579.jar=C:\Users\Tory\AppData\Local\Temp\coverage178args -Didea.test.cyclic.buffer.size=1048576 "-javaagent:D:\Software\Program\IntelliJ IDEA\IntelliJ IDEA 2021.1.1\lib\idea_rt.jar=60502:D:\Software\Program\IntelliJ IDEA\IntelliJ IDEA 2021.1.1\bin" -Dfile.encoding=UTF-8 -classpath "D:\Software\Program\IntelliJ IDEA\IntelliJ IDEA 2021.1.1\lib\idea_rt.jar;D:\Software\Program\IntelliJ IDEA\IntelliJ IDEA 2021.1.1\plugins\junit\lib\junit5-rt.jar;D:\Software\Program\IntelliJ IDEA\IntelliJ IDEA 2021.1.1\plugins\junit\lib\junit-rt.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\rt.jar;D:\Code\antlr\SqlConverter\adam-sql-converter-db2\target\test-classes;D:\Code\antlr\SqlConverter\adam-sql-converter-db2\target\classes;D:\Code\antlr\SqlConverter\adam-sql-converter-common\target\classes;C:\Users\Tory\.m2\repository\org\antlr\antlr4-runtime\4.5.3\antlr4-runtime-4.5.3.jar;C:\Users\Tory\.m2\repository\org\mariadb\jdbc\mariadb-java-client\1.7.4\mariadb-java-client-1.7.4.jar;C:\Users\Tory\.m2\repository\org\slf4j\slf4j-api\1.7.23\slf4j-api-1.7.23.jar;C:\Users\Tory\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\Tory\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\Tory\.m2\repository\org\apache\commons\commons-lang3\3.9\commons-lang3-3.9.jar;D:\Code\antlr\SqlConverter\adam-sql-analyzer\target\classes;C:\Users\Tory\.m2\repository\junit\junit\4.12\junit-4.12.jar;C:\Users\Tory\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\Tory\.m2\repository\org\projectlombok\lombok\1.16.16\lombok-1.16.16.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 com.sqlconverter.ddl.UniqueConstraintAndDistributionKeyRuleTest,testHandleNode

 


At least 5 arguments expected but 1 found.
Expected arguments are:
1) data file to save coverage result
2) a flag to enable tracking per test coverage
3) a flag to calculate coverage for unloaded classes
4) a flag to use data file as initial coverage
5) a flag to run coverage in sampling mode or in tracing mode otherwise

0
5 comments

Hello,

Please clarify how is the provided stacktrace connected to the features that you describe? What errors do you mean? Do you you user Intellij test coverage?

Please see the following doc that covers some features that you described (tracing/sampling/per test) https://www.jetbrains.com/help/idea/running-test-with-coverage.html#coverage-run-configurations

Here is how the coverage can be saved: https://www.jetbrains.com/help/idea/generating-code-coverage-report.html

Also please describe in more details the 3 and the 4 point. 

Thank you 

-2

My version of IDEA is Community, You can take a try. Open the IDEA ,click follow the steps below: Help => Edit Custom VM Options, then insert a record 

-Djava.io.tmpdir=D:\new

 `D:\new` can be replace with where you want to save the generated file by IDEA, then restart IDEA.

3

@Syjperson are you the author of the original post, or are you experiencing similar problem?

0

Try path File -> Invalidate Caches -> clear file system cache and local history -> invalidate and restart. Maybe it will work.

-1

It seems the error occurs only when java temporary directory contains non-ASCII symbols. We reproduced it on Windows with OS username which contains Cyrillic symbols, but didn't reproduce when username contains only English letters. Also the solution given by user Syjperson only helped when java.io.tmpdir did not contain Cyrillic characters and did not help otherwise.

0

Please sign in to leave a comment.