vscode-java-test icon indicating copy to clipboard operation
vscode-java-test copied to clipboard

Pass/fail indicators not showing above test cases or in test explorer

Open kakins opened this issue 5 years ago • 13 comments

I'm not seeing the green/red indicators for pass/failed tests in test explorer or in code lense.

image

However, I can see the resulting Java Test Report which shows pass/failed tests.

image

I am using the extension with TestNG.

kakins avatar Dec 18 '19 16:12 kakins

Seems that the test name in result is different from that in explorer so they didn't bind together. Will it possible to share a sample project to us?

jdneo avatar Dec 19 '19 01:12 jdneo

I have a problem where the icon colors are gone. I changed my theme to different ones, and the checkmark/x are always grey.

Screen Shot 2019-12-19 at 2 36 07 PM

agonzalez0515 avatar Dec 19 '19 22:12 agonzalez0515

@agonzalez0515 This is by design. We change the Code Lens from Emojis to Octicons in 0.22.0. See: https://github.com/microsoft/vscode-java-test/issues/845

jdneo avatar Dec 20 '19 02:12 jdneo

Seems that the test name in result is different from that in explorer so they didn't bind together. Will it possible to share a sample project to us?

Not sure I can share the project. But I'll look into it a bit more and let you know what I find, based on what you said.

kakins avatar Dec 20 '19 02:12 kakins

@kakins Thank you. Meanwhile, you can set the log level of Java Test Runner to verbose and to see if there is anything strange in the output channel in the Java Test Runner.

If it is possible to share the logs here would also be great.

jdneo avatar Dec 20 '19 02:12 jdneo

By the way, I apologize I've let this one slip by me. I've been out of my office for a while but will try to get back to testing this soon. Please don't close it yet! :)

kakins avatar Jan 05 '20 01:01 kakins

@kakins, Sure, thank you!

jdneo avatar Jan 06 '20 02:01 jdneo

Just keeping you all posted. I will be on leave from my work for the next several weeks, but will try and revisit this as soon as I return.

kakins avatar Jan 22 '20 23:01 kakins

@jdneo I'm back and looking at this issue.

Seems that the test name in result is different from that in explorer so they didn't bind together. Will it possible to share a sample project to us?

I checked a different test, which shows the same test name in the explorer and the result. So I'm not sure this is the issue.

I've increased the log level to Verbose. Here is the output of a test where the past/fail indicators are not working:

{
    "message": "Launching with the following launch configuration: '{\n  \"name\": \"Launch Java Tests - 343ffe\",\n  \"type\": \"java\",\n  \"request\": \"launch\",\n  \"mainClass\": \"com.microsoft.java.test.runner.Launcher\",\n  \"projectName\": \"elc\",\n  \"cwd\": \"${workspaceFolder}/elc\",\n  \"classPaths\": [\n    \"C:\\\\Users\\\\krisakins\\\\source\\\\repos\\\\Felucia\\\\Felucia\\\\elc\\\\bin\\\\main\",\n    \"C:\\\\Users\\\\krisakins\\\\source\\\\repos\\\\Felucia\\\\Felucia\\\\elc\\\\bin\\\\test\",\n    \"\\\\elc\\\\bin\\\\default\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.googlecode.json-simple\\\\json-simple\\\\1.1\\\\5e303a03d04e6788dddfa3655272580ae0fc13bb\\\\json-simple-1.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.codehaus.groovy\\\\groovy-all\\\\2.4.15\\\\423a17aeb2f64bc6f76e8e44265a548bec80fd42\\\\groovy-all-2.4.15.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.json\\\\json\\\\20180813\\\\8566b2b0391d9d4479ea225645c6ed47ef17fe41\\\\json-20180813.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.testng\\\\testng\\\\6.14.3\\\\d24515dc253e77e54b73df97e1fb2eb7faf34fdd\\\\testng-6.14.3.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-java\\\\3.14.0\\\\5b50d4072e0e51779b6e9f3594106312061bfde\\\\selenium-java-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.fasterxml.jackson.datatype\\\\jackson-datatype-jsr310\\\\2.8.10\\\\c7e69a2619d22f067e96ac1fec95b4157604167f\\\\jackson-datatype-jsr310-2.8.10.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.fasterxml.jackson.core\\\\jackson-databind\\\\2.8.10\\\\f7b83cb2bc4b88d53961e749e1ad32f49ef017b7\\\\jackson-databind-2.8.10.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.fasterxml.jackson.core\\\\jackson-core\\\\2.8.10\\\\eb21a035c66ad307e66ec8fce37f5d50fd62d039\\\\jackson-core-2.8.10.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\net.andreinc.mockneat\\\\mockneat\\\\0.2.4\\\\1655a4b37ab80f17918236e27724fff337f93183\\\\mockneat-0.2.4.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.github.Ullink\\\\simple-slack-api\\\\1.2.0\\\\202326d251c2c8d1b710d8b62ed459ffccdd1589\\\\simple-slack-api-1.2.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.microsoft.sqlserver\\\\mssql-jdbc\\\\6.1.0.jre7\\\\f1a9c339e6a363d587dd4fa52fa40ff50d667e05\\\\mssql-jdbc-6.1.0.jre7.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.microsoft.azure\\\\azure-keyvault\\\\0.9.3\\\\4fdf9fb465677143dab121f2bbbc80afd46de647\\\\azure-keyvault-0.9.3.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.microsoft.azure\\\\adal4j\\\\1.0.0\\\\880e133fdc0082cda48bd12b7a07f1311c2a6d73\\\\adal4j-1.0.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.slf4j\\\\slf4j-api\\\\1.7.25\\\\da76ca59f6a57ee3102f8f9bd9cee742973efa8a\\\\slf4j-api-1.7.25.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.github.detro\\\\ghostdriver\\\\2.1.0\\\\40370fa5208850b75f68afd17032d98a7d38648b\\\\ghostdriver-2.1.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.launchdarkly\\\\launchdarkly-client\\\\4.61\\\\8d0b62f9b7e2d981c16978a4d32dc5ae2be096e\\\\launchdarkly-client-4.61.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.beust\\\\jcommander\\\\1.72\\\\6375e521c1e11d6563d4f25a07ce124ccf8cd171\\\\jcommander-1.72.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.apache-extras.beanshell\\\\bsh\\\\2.0b6\\\\fb418f9b33a0b951e9a2978b4b6ee93b2707e72f\\\\bsh-2.0b6.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-chrome-driver\\\\3.14.0\\\\a8fa5d063821f70dab0b7170d4b814ef49ce4962\\\\selenium-chrome-driver-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-edge-driver\\\\3.14.0\\\\ca62365ff82c8c03861848355932ab36ddd73f57\\\\selenium-edge-driver-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-firefox-driver\\\\3.14.0\\\\f35ddc0b5e0e09be644df14ada85d83e6b8b3f3c\\\\selenium-firefox-driver-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-ie-driver\\\\3.14.0\\\\3c92cd026f08d381aa9cff8eca03962add562577\\\\selenium-ie-driver-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-opera-driver\\\\3.14.0\\\\123ae21ad13ecc888bf3e18d5c65857df32e6a9f\\\\selenium-opera-driver-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-safari-driver\\\\3.14.0\\\\8dade249fbfc6833697592c155638f348de10fbd\\\\selenium-safari-driver-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-support\\\\3.14.0\\\\2a8bfbe41c44a14f5674ea7bbcfc577259d34f99\\\\selenium-support-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-remote-driver\\\\3.14.0\\\\434c26e9df775d8f49619f7275a65a36d2d72ceb\\\\selenium-remote-driver-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.seleniumhq.selenium\\\\selenium-api\\\\3.14.0\\\\73e6db9b3cdc42966679a2112bfde9efbef16223\\\\selenium-api-3.14.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\net.bytebuddy\\\\byte-buddy\\\\1.8.15\\\\cb36fe3c70ead5fcd016856a7efff908402d86b8\\\\byte-buddy-1.8.15.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.apache.commons\\\\commons-exec\\\\1.3\\\\8dfb9facd0830a27b1b5f29f84593f0aeee7773b\\\\commons-exec-1.3.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.apache.httpcomponents\\\\httpmime\\\\4.5.3\\\\889fd6d061bb63b99dd5c6aba35a555ae863de52\\\\httpmime-4.5.3.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.microsoft.azure\\\\azure-core\\\\0.9.3\\\\7fe32241b738aad0f700f4277fa998230c144ae7\\\\azure-core-0.9.3.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.apache.httpcomponents\\\\httpclient\\\\4.5.5\\\\1603dfd56ebcd583ccdf337b6c3984ac55d89e58\\\\httpclient-4.5.5.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.nimbusds\\\\oauth2-oidc-sdk\\\\4.5\\\\72d219d77265d50aee1ed294d05f39f332005aeb\\\\oauth2-oidc-sdk-4.5.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\commons-codec\\\\commons-codec\\\\1.11\\\\3acb4705652e16236558f0f4f2192cc33c3bd189\\\\commons-codec-1.11.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\commons-logging\\\\commons-logging\\\\1.2\\\\4bfc12adfe4842bf07b657f0369c4cb522955686\\\\commons-logging-1.2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.google.guava\\\\guava\\\\25.0-jre\\\\7319c34fa5866a85b6bad445adad69d402323129\\\\guava-25.0-jre.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.apache.httpcomponents\\\\httpcore\\\\4.4.9\\\\a86ce739e5a7175b4b234c290a00a5fdb80957a0\\\\httpcore-4.4.9.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.squareup.okhttp3\\\\okhttp\\\\3.10.0\\\\7ef0f1d95bf4c0b3ba30bbae25e0e562b05cf75e\\\\okhttp-3.10.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.squareup.okio\\\\okio\\\\1.14.1\\\\3bd22672d0999a1a4d13b542b5dd855a89e69993\\\\okio-1.14.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.fasterxml.jackson.core\\\\jackson-annotations\\\\2.8.0\\\\45b426f7796b741035581a176744d91090e2e6fb\\\\jackson-annotations-2.8.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.apache.commons\\\\commons-text\\\\1.3\\\\9abf61708a66ab5e55f6169a200dbfc584b546d9\\\\commons-text-1.3.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.apache.commons\\\\commons-lang3\\\\3.7\\\\557edd918fd41f9260963583ebf5a61a43a6b423\\\\commons-lang3-3.7.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.github.mifmif\\\\generex\\\\1.0.2\\\\b378f873b4e8d7616c3d920e2132cb1c87679600\\\\generex-1.0.2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\net.andreinc.aleph\\\\aleph-formatter\\\\0.1.0\\\\18ee5996b263ee26e86f78e30d8fe50f024ee72e\\\\aleph-formatter-0.1.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\commons-io\\\\commons-io\\\\1.3.2\\\\b6dde38349ba9bb5e6ea6320531eae969985dae5\\\\commons-io-1.3.2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.google.code.gson\\\\gson\\\\2.8.0\\\\c4ba5371a29ac9b2ad6129b1d39ea38750043eff\\\\gson-2.8.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.threeten\\\\threetenbp\\\\1.3.1\\\\5769e9c27cd5ba74cd3a73785dde0bbb5a2d3c0d\\\\threetenbp-1.3.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.glassfish.tyrus.bundles\\\\tyrus-standalone-client\\\\1.13.1\\\\325c82a08fd60fe5d0a0776acd1166027fcd9730\\\\tyrus-standalone-client-1.13.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\javax.websocket\\\\javax.websocket-api\\\\1.1\\\\eeeb68631711256418dfbb47b11c731b6c8f6235\\\\javax.websocket-api-1.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.google.code.findbugs\\\\jsr305\\\\1.3.9\\\\40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf\\\\jsr305-1.3.9.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.checkerframework\\\\checker-compat-qual\\\\2.0.0\\\\fc89b03860d11d6213d0154a62bcd1c2f69b9efa\\\\checker-compat-qual-2.0.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.google.errorprone\\\\error_prone_annotations\\\\2.1.3\\\\39b109f2cd352b2d71b52a3b5a1a9850e1dc304b\\\\error_prone_annotations-2.1.3.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.google.j2objc\\\\j2objc-annotations\\\\1.1\\\\ed28ded51a8b1c6b112568def5f4b455e6809019\\\\j2objc-annotations-1.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.codehaus.mojo\\\\animal-sniffer-annotations\\\\1.14\\\\775b7e22fb10026eed3f86e8dc556dfafe35f2d5\\\\animal-sniffer-annotations-1.14.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\dk.brics.automaton\\\\automaton\\\\1.11-8\\\\6ebfa65eb431ff4b715a23be7a750cbc4cc96d0f\\\\automaton-1.11-8.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\javax.inject\\\\javax.inject\\\\1\\\\6975da39a7040257bd51d21a231b76c915872d38\\\\javax.inject-1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\commons-lang\\\\commons-lang\\\\2.6\\\\ce1edb914c94ebc388f086c6827e8bdeec71ac2\\\\commons-lang-2.6.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\javax.mail\\\\mail\\\\1.4.7\\\\9add058589d5d85adeb625859bf2c5eeaaedf12d\\\\mail-1.4.7.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.sun.jersey\\\\jersey-client\\\\1.13\\\\ec38c57a78940bf5f8f5971307ca89406849647\\\\jersey-client-1.13.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.sun.jersey\\\\jersey-json\\\\1.13\\\\f7346cce2c0e73afd39e2783c173ee134f79a0f9\\\\jersey-json-1.13.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.sun.xml.bind\\\\jaxb-impl\\\\2.2.3-1\\\\56baae106392040a45a06d4a41099173425da1e6\\\\jaxb-impl-2.2.3-1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\javax.xml.bind\\\\jaxb-api\\\\2.2.2\\\\aeb3021ca93dde265796d82015beecdcff95bf09\\\\jaxb-api-2.2.2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\javax.activation\\\\activation\\\\1.1\\\\e6cb541461c2834bdea3eb920f1884d1eb508b50\\\\activation-1.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.sun.jersey\\\\jersey-core\\\\1.13\\\\4326a56dc6b2d67b7313905c353e1af225bb164f\\\\jersey-core-1.13.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.codehaus.jettison\\\\jettison\\\\1.1\\\\1a01a2a1218fcf9faa2cc2a6ced025bdea687262\\\\jettison-1.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.codehaus.jackson\\\\jackson-jaxrs\\\\1.9.2\\\\aedf43f1d5005561e531b6bf0d067e4d20f58aba\\\\jackson-jaxrs-1.9.2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.codehaus.jackson\\\\jackson-xc\\\\1.9.2\\\\437c991a8eb2c8b69ef1dba2eba27fccb9b98448\\\\jackson-xc-1.9.2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.codehaus.jackson\\\\jackson-mapper-asl\\\\1.9.2\\\\95400a7922ce75383866eb72f6ef4a7897923945\\\\jackson-mapper-asl-1.9.2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.codehaus.jackson\\\\jackson-core-asl\\\\1.9.2\\\\8493982bba1727106d767034bd0d8e77bc1931a9\\\\jackson-core-asl-1.9.2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.nimbusds\\\\nimbus-jose-jwt\\\\3.1.2\\\\105c0ca7e1dc2c0bfaa1b8c65d7bc45231935e19\\\\nimbus-jose-jwt-3.1.2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\net.jcip\\\\jcip-annotations\\\\1.0\\\\afba4942caaeaf46aab0b976afd57cc7c181467e\\\\jcip-annotations-1.0.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.nimbusds\\\\lang-tag\\\\1.4\\\\61813ab726bac7955f9e99f6fd0345b8a6105ae5\\\\lang-tag-1.4.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\net.minidev\\\\json-smart\\\\1.1.1\\\\24a2f903d25e004de30ac602c5b47f2d4e420a59\\\\json-smart-1.1.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\stax\\\\stax-api\\\\1.0.1\\\\49c100caf72d658aca8e58bd74a4ba90fa2b0d70\\\\stax-api-1.0.1.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.bouncycastle\\\\bcprov-jdk15on\\\\1.51\\\\9ab8afcc2842d5ef06eb775a0a2b12783b99aa80\\\\bcprov-jdk15on-1.51.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\javax.xml.stream\\\\stax-api\\\\1.0-2\\\\d6337b0de8b25e53e81b922352fbea9f9f57ba0b\\\\stax-api-1.0-2.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.slf4j\\\\slf4j-simple\\\\1.7.25\\\\8dacf9514f0c707cbbcdd6fd699e8940d42fb54e\\\\slf4j-simple-1.7.25.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\junit\\\\junit\\\\4.13\\\\e49ccba652b735c93bd6e6f59760d8254cf597dd\\\\junit-4.13.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\com.github.javafaker\\\\javafaker\\\\0.16\\\\a6d13b5da669e6ea67b8dbf1105e48385c4cac2e\\\\javafaker-0.16.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.hamcrest\\\\hamcrest-core\\\\1.3\\\\42a25dc3219429f0e5d060061f71acb49bf010a0\\\\hamcrest-core-1.3.jar\",\n    \"C:\\\\Users\\\\krisakins\\\\.gradle\\\\caches\\\\modules-2\\\\files-2.1\\\\org.yaml\\\\snakeyaml\\\\1.20\\\\2aedb93fd5541cb5d78e9c6dd80d72ef8ef1c95f\\\\snakeyaml-1.20-android.jar\",\n    \"c:\\\\Users\\\\krisakins\\\\.vscode\\\\extensions\\\\vscjava.vscode-java-test-0.22.1\\\\server\\\\com.microsoft.java.test.runner.jar\",\n    \"c:\\\\Users\\\\krisakins\\\\.vscode\\\\extensions\\\\vscjava.vscode-java-test-0.22.1\\\\server\\\\lib\"\n  ],\n  \"modulePaths\": [],\n  \"args\": [\n    \"60404\",\n    \"testng\",\n    \"test.CaseTest#checkCaseNotes\"\n  ],\n  \"vmArgs\": [\n    \"-ea\"\n  ],\n  \"env\": {},\n  \"noDebug\": true,\n  \"console\": \"internalConsole\"\n}'\n",
    "level": "verbose"
}
{
    "message": "{\"name\":\"testStarted\",\"attributes\":{\"name\":\"test.CaseTest#CaseTest.checkCaseNotes [prepare, setup]\"}}\n",
    "level": "verbose"
}
{
    "message": "{\"name\":\"testFinished\",\"attributes\":{\"name\":\"test.CaseTest#CaseTest.checkCaseNotes [prepare, setup]\",\"duration\":\"18923\"}}\n",
    "level": "verbose"
}

kakins avatar Feb 19 '20 18:02 kakins

Thanks @kakins,

Yes just as you can see, the explorer 'thinks' the test is called checkCaseNotes while the output returned is checkCaseNotes [prepare, setup]. I guess this is where the mismatch happens.

Could you let me know what annotation are you using for this case? Or a sample code snippet would be even better

jdneo avatar Feb 20 '20 01:02 jdneo

Interesting, I think I see at least part of the problem now.

Here is an example of our test class:

public class CaseTest extends TestBase {
    @BeforeMethod
    public void prepare() {
         //...
    }

    @Test
    public void checkCaseNotes() {
        //...
    }
}

I had not looked into our TestBase class, which appears to override the test name. I'm assuming this has at least something to do with it.

public class TestBase implements ITest {
    private String testName = null;

    @Override
    public String getTestName() {
        return this.testName;
    }

    @BeforeMethod
    public void setup(Method method, ITestContext context) throws Exception {
        //...
        this.testName = String.format("%s.%s %s", method.getDeclaringClass().getSimpleName(), method.getName(), beforeMethods.toString());
    }
}

If that's a problem, I'm not very inclined to change the base class at this point because I'm unsure of what it could break. Do I have any alternatives?

kakins avatar Feb 24 '20 14:02 kakins

I see, this is because the current TestNG's runner only get the test name according to the function's name.

One approach could be: check if it is possible to use the TestNG's official runner to run the tests.

jdneo avatar Feb 25 '20 02:02 jdneo