End to end tests with CasperJS and Jenkins

29 views
Skip to first unread message

Daniela Morais

unread,
Jun 19, 2015, 12:28:06 PM6/19/15
to jenkins...@googlegroups.com
I have a script that checks whether all application modules are up and returning the result correctly, but need to test the upload .xlsx and .zip files.
I'm developing in CasperJS and desire to integrate with Jenkins (which I'm still learning about).

My question is: How do I access these .xlsx files and zip when integrating with Jenkins?
Just put in the Jenkins workspace directory and access or is something more complex than having to use Parameterized Trigger Plugin? There's another solution?

Maciej Jaros

unread,
Jun 24, 2015, 8:39:56 AM6/24/15
to jenkins...@googlegroups.com
Daniela Morais (2015-06-19 18:28):
You mean the files are uploaded by the user during the build? If so then this is a bit tricky...
  1. Then name of the file will be the same as what you put into the "File location" field of "File parameter".
  2. An original name of the file will be available in an environment variable with the same name as what you put into the "File location" field of "File parameter".

So. if in the "File location" you put "myZipFile". Then

  1. The name of the file after upload is just that -- "myZipFile" and it lands in the workspace.
  2. The original name is available (which you can print to log on Windows as: `echo %myZipFile%` or on Linux: `echo $myZipFile`)

You can rename the file to original name by executing shell command:
mv myZipFile $myZipFile

Or by issuing Windows batch command like (depending where your Jenkins is installed):
move myZipFile %myZipFile%

Regards,
Nux.

Reply all
Reply to author
Forward
0 new messages