User Interface Tests with Jenkins and CasperJS

I have a script that checks if all application modules have returned and returned the result correctly, but I need to check the .xlsx and .zip files.
I am developing at CasperJS and wish to integrate with Jenkins (which I still learn about).

My question is: How do I access these .xlsx and zip files when integrating with Jenkins?
Just enter the Jenkins workspace directory and gain access or something more complicated than using the Parameterized Trigger Plugin ? Is there another solution? (maybe one that doesn't use Jenkins and CasperJS)

+6
source share
1 answer

A parameterized trigger will not do what you need; his goal is to transfer parameters / variables from the task to the work tasks that he runs.

You are on the right path to putting files on the workspace, but you need a good way to get them there: you must store the xlsx and zip files on a server accessible by the slave and receive them on demand before running CasperJS tests.

Copy to Slave Plugin may be what you need. From their description:

This plugin allows you to copy a set of files from a location somewhere on the main node to workspace workspaces.

To use it, copy the xlsx / zip files to the Jenkins wizard, say:

 $JENKINS_HOME/userContent/casperjs/testZip.zip $JENKINS_HOME/userContent/casperjs/testXL.xlsx 

In the build task, you select the Copy files to workspace before creation check box, and for the files that you want to copy, you must put casperjs/** . Your CasperJS tests can then refer to them as casperjs/testZip.zip and casperjs/testXL.xlsx .

You can use other methods ( scp and curl come to mind), but Copy to Slave is probably the most "Jenkinsy" way to do this.

+2
source

Source: https://habr.com/ru/post/989222/


All Articles