junsiong2008
junsiong2008

Reputation: 117

Jenkins Output Incomplete Log to the Console - SilkTest

I have a Jenkins pipeline that will run a batch file which contains command to run silk test. The part of the pipeline is as follow:

stage('execute-testscripts') {
            steps {
                script {
                        bat "cd Automation"
                        bat "C:\\Users\\Administrator\\Desktop\\silk_test.bat"
                }
            }
        }

The content of silk_test.bat is as follow:

"C:\Program Files (x86)\Silk\SilkTest\ng\gui\STW.exe" -d examplexx -u example_id -p xxxxxx -r MY_EXAMPLE -s "ExampleXML" -verbose >> output.txt
type output.txt
del output.txt

When I execute the batch file on the command prompt on the Jenkins slave (via Remote Desktop Connection), the result is as follow (some details are hidden): enter image description here

However, when I run the build on Jenkins, the console output is incomplete (doesn't show the output after the line "VERBOSE MODE: ON"): enter image description here

[The same command is being run on the same Jenkins slave]

Is there any way to fix the Jenkins pipeline so that it displays the complete console output?

Upvotes: 0

Views: 485

Answers (1)

junsiong2008
junsiong2008

Reputation: 117

The issue is resolved by running the Jenkins slave agent as a Windows process, rather than running it as a Windows service, so that the process can interact with the applications.

Upvotes: 0

Related Questions