Unanswered question

NeoLoad plugin for Jenkins - some more problems

Hi all,

My initial problem with NeoLoad Jenkins plugin has been resolved with new plugin version (discussed here: http://answers.neotys.com/questions/1276130-neoload-plugin-jenkins-fails-start).

I'm now able to configure and run the NeoLoad job on Jenkins slave. However, I'm experiencing two more issues...

At first, once I run the job for the first time, it creates some subdirs in NeoLoad project ("libs" and "results"), and sets these dirs as "read-only". So the next time the job is started, TFS plugin (Jenkins itself) fails to delete the content of NeoLoad project dir with "Access Denied" error...

Deleted 1 workspace(s) named 'Jenkins-PLRM_NeoLoad-CPRAN04'.
java.nio.file.AccessDeniedException: c:\Jenkins\workspace\PLRM_NeoLoad\tfs\PLRM_NeoLoad\lib\extlib
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
...

At second, "Test Result Name" fails to convert suggested build number variable. It only translates date variable. And if the build number variable is used together with date variable (as shown in plugin configuration help) the test fails to run.

This fails the job:
$Date{hh:mm - dd MMM yyyy} build ${BUILD_NUMBER}

This translates date:
$Date{hh:mm - dd MMM yyyy}

This shows exactly the same (untranslated) string in report name:
(build ${BUILD_NUMBER})
or
build ${BUILD_NUMBER}
or
${BUILD_NUMBER}

Thanks in advance.

Pavel K.
Pavel K.

Pavel K.

Level
0
18 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

The permission issue is maybe something specific to your environment. Those folders are created but they should be at least rw for the user that is creating them. So maybe you created your project with one user but you run your test with another user.

Regarding issue two, the date in the Jenkins console will not be replaced since it's not a Jenkins variable but an argument of the -testResultName option. The result should be seen in the Test description in your generated report. You should see the date of your test.

Pavel K.
Pavel K.

Pavel K.

Level
0
18 / 100
points

Hi Nouredine,

I'm quite sure those folders were created with the same user as the one who runs the test. Anyway, I solved the problem by using two Jenkins jobs...one for build, which then archives the artifacts and second job, which copies all data from build job and starts the test.

As for the second issue, I have no problem with date variable, but BUILD_NUMBER variable. I've just followed the instructions from the NeoLoad Jenkins plugin help, which says this...

"This is the name of the test results. The value $Date{hh:mm - dd MMM yyyy} is replaced by the current date by NeoLoad and the value ${BUILD_NUMBER} is replaced by the current build number by Jenkins.
For example, $Date{hh:mm - dd MMM yyyy} (build ${BUILD_NUMBER}). "

Sadly, BUILD_NUMBER is either not translated or it fails the run (if used together with 'date' variable).

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

This ${BUILD_NUMBER} variable is a Jenkins variable. I used that exact syntax below and i did not have any issues:

MyTest-$Date{yyyy-MM-dd_HH.mm} (build ${BUILD_NUMBER})

My Jenkins version is 1.651.2 so pretty old. You may try with ${BUILD_ID} instead if it makes any differences.