I am running golang test cases and saving test result to testreport.xml by following command. go test -v ./testqa | go-junit-report > testqa/testreport.xml
Where testqa is my test folder which contains framework code, testreport.xml file and test files in it.
xml file read by jenkins and by using go-junit-report module, I am displaying those result to jenkins UI.
So there are two scenarios
Jenkins running in my local workspace upper command works fine in my local Jenkins which runs on local workspace. It is perfectly populating that xml file and displaying result correctly.
I also need to configure go-junit-report to project remote server. Project workspace, I am using here is Github url.
If I run this command >> go test -v ./testqa , test runs fine in company's jenkin server
But when I use this command for test reporting >>> go test -v ./testqa | go-junit-report > testqa/testreport.xml
There error I got is
/tmp/jenkins9406057064778860048.sh: 5: go-junit-report: not found
go-junit-reportis not installed on the jenkins node.