Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions TestPlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,13 @@ Exception in thread "main" java.lang.IllegalStateException
7. Verify that the program starts, and there is no information in "watch" and "callstack" view.
8. Click the "pause" button in the toolbar, it should NOT pause the program.
9. Click the "stop" button in the toolbar, it should stop the program.


## Environment Variables
1. Open `26.environmentVariables` in vscode.
2. Press <kbd>F5</kbd> to start.
3. Verify the output in Debug Console should be as following:
```
CustomEnv: This env is for test plan.
SystemPath: <value of PATH >
```
6 changes: 6 additions & 0 deletions testprojects/26.environmentVariables/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 changes: 17 additions & 0 deletions testprojects/26.environmentVariables/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>26.environmentVariables</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
23 changes: 23 additions & 0 deletions testprojects/26.environmentVariables/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"type": "java",
"name": "Debug (Launch)-EnvrionmentVariable<26.environmentVariables>",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopOnEntry": false,
"mainClass": "EnvrionmentVariable",
"args": "",
"projectName": "26.environmentVariables",
"env": {
"CUSTOM_ENV_FOR_TEST_PLAN": "This env is for test plan."
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class EnvrionmentVariable {
public static void main(String[] args) {
String customEnv = System.getenv("CUSTOM_ENV_FOR_TEST_PLAN");
String systemPath = System.getenv("PATH");
System.out.println(String.format("CustomEnv: %s", customEnv));
System.out.println(String.format("SystemPath: %s", systemPath));
}
}