getappmap / getappmap/appmap-js

Provide better guidance on suitable test commands for java project

Open
#848 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
53
Forks
18
Avg merge
3d 18h
Merged PRs (30d)
8

Description

In telemetry I've seen a user struggle ultimately without success to provide correct test commands with java (log anonymized):

g:\My Data\_My Documents\_FIRST\ABC\Visual Studio Code\Test Project
===
{}
===
'g:\My' is not recognized as an internal or external command,
operable program or batch file.

g:\My Data\_My Documents\_FIRST\ABC\Visual Studio Code\Test Project
===
{}
===
'g:\My' is not recognized as an internal or external command,
operable program or batch file.

"C:\Program Files\Amazon Corretto\jdk11.0.14_9\bin\java.exe" "-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:60986" "-Djava.library.path=G:\My Data\_My Documents\_FIRST\ABC\Visual Studio Code\Test Project\build\jni\release" "@C:\Users\user\AppData\Local\Temp\cp_af3mtaoo5kd0r4lrhj2jj5hwd.argfile" "ABC.robot.Main"
===
{}
===

"C:\Program Files\Amazon Corretto\jdk11.0.14_9\bin\java.exe" "-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:60986" "-Djava.library.path=G:\My Data\_My Documents\_FIRST\ABC\Visual Studio Code\Test Project\build\jni\release" "@C:\Users\user\AppData\Local\Temp\cp_af3mtaoo5kd0r4lrhj2jj5hwd.argfile" "ABC.robot.Main"
===
{}
===
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [./src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:735]

"C:\Program Files\Amazon Corretto\jdk11.0.14_9\bin\java.exe" "-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:60986" "-Djava.library.path=G:\My Data\_My Documents\_FIRST\ABC\Visual Studio Code\Test Project\build\jni\release" "@C:\Users\user\AppData\Local\Temp\cp_af3mtaoo5kd0r4lrhj2jj5hwd.argfile" "ABC.robot.Main"
===
{}
===
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [./src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:735]

C:\Program Files\Amazon Corretto\jdk11.0.14_9\bin\java.exe -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:60986 -Djava.library.path=G:\My Data\_My Documents\_FIRST\ABC\Visual Studio Code\Test Project\build\jni\release @C:\Users\user\AppData\Local\Temp\cp_af3mtaoo5kd0r4lrhj2jj5hwd.argfile ABC.robot.Main
===
{}
===
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

"C:\Program Files\Amazon Corretto\jdk11.0.14_9\bin\java.exe" "-Djava.library.path=G:\My Data\_My Documents\_FIRST\ABC\Visual Studio Code\Test Project\build\jni\release" "@C:\Users\user\AppData\Local\Temp\cp_af3mtaoo5kd0r4lrhj2jj5hwd.argfile" "ABC.test.Main"
===
{}
===
HAL Extensions: No extensions found
,********** Test program starting **********
,NT: ERROR: bind() to port 1735 failed: Only one usage of each socket address (protocol/network address/port) is normally permitted.
(TCPAcceptor.cpp:120)
,********** Test program startup complete **********

I'm not sure how handling of test commands work for Java, which requires a javaagent argument added, but it seems to me none of these invocations is correct. You can also see the user struggling with understanding what they need to provide (just the directory? do I need the path to the java runtime? do I need the entire command line?) and with handling spaces (we could validate the input a bit to make this easier).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test entry point is named. Start by tracing how Java test commands and paths are collected and executed, then reproduce the Windows examples with spaces and Java agent arguments. Done means users receive clear guidance about the expected input and invalid or ambiguous commands are handled more helpfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
developer-experience, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.