Where does the downloaded file go when execute robot framework using Jenkins - google-chrome

I need one help,
I am Executing a script of robot framework using Jenkins, as per the flow the script should download one XLS and validate the data using Pandas.
When I am executing the script using Jenkins and searching the downloaded file in a hardcoded path i.e. "C:\Users\Administrator\Downloads" the file is not found.
but when executing it manually the file downloaded on the same path
Can anyone please help me by telling me where do Jenkins stores all the downloaded files?
PS : I am using Google Chrome as web browser

For each job Jenkins runs, it creates a workspace directory, usually at:
$JENKINS_HOME/workspace/(Name of the Job)
The scripts (and robotframework's in this case) are run there, as the root directory. Most probably the downloaded file will be in a path from there (or an error should have occurred because the Jenkins user does not have access to the C:\Users... path).
There is a step in the Jenkins job, which is to archive (download) files from workspace, to Jenkins database, to be shown as "artifacts". Even the screenshots images or videos recording, must be registered in that step, so they can be viewed on the Report and Log in Jenkins (Robot Framework Plugin).

Related

Google cloud - Stackdriver debug reports "File was not found in the executable" for GCE Jetty war

I've been trying to follow the
Setting Up Stackdriver Debugger for Java applications on Google Compute Engine, but am running into issues with Stackdriver Debug.
I'm building my .war file from a separate build server, then deploying it to my GCE server. I added the agent to the start command via /etc/defaults, and my app appears in the https://console.cloud.google.com/debug control panel. The version I set in the run command matches the revision that shows up in the source-context(s).json files.
However when I click open the app, I see the message that
No source version information was provided by the deployed application
I connected the app's git repo as a mirrored cloud repository, and can browse the source files in the sidebar of the Stackdriver Debug page. But, If I browse to a file and add a breakpoint I get an error that the error "File was not found in the executable."
I have ran the gcloud preview app gen-repo-info-file command, which created two basic json files storing my git repo and revision. Is it supposed to do anything else?
I have tried running jetty using both normal and extracted modes. If I have jetty first extract the war file, I can see the source-context.json filesin the WEB-INF/classes directory.
What am I missing?
https://github.com/GoogleCloudPlatform/cloud-debug-java#extra-classpath mentions
you can update the agentPath showing your WEB-INF/class directory.
-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classes
For multiple class paths:
-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classes:/another/path/with/classes
There are a couple of things going on here.
First, it sounds like you are doing the correct thing with gen-repo-info-file. The debugger agent should pick up the json files from the WEB-INF/classes directory.
The debugger uses fuzzy matching to find source files, so as long as the name of the .java file matches a file in your executable, you should not get that error.
The most likely scenario given the information in your question is that you are attaching the debugger to a launcher process, rather than your actual application. Without further details, I can't absolutely confirm that, though.
If you send us more details at cdbg-feedback#google.com, we can look more closely at your case to see if we can understand exactly what's happening, and potentially improve our documentation, since it sounds like you followed the docs pretty closely.

How can jenkins find junit.xml in a zip file?

I am running Jenkins on a script, that generates a junit.xml report file and other files. However, all those files are zipped by the script, hence Jenkins cannot find it.
Is there a way to make Jenkins unzip the .zip file , find my particular junit file and generate the run results ?
All this is in Linux.
Thanks
Jenkins has the ability to execute arbitrary shell commands as a build step, just add the 'Execute Shell' step to your build and put in the commands you want (presumably 'unzip' would be among them).
Once you've extracted the xml, provided your internal tool generates it using this schema the JUnit plugin just needs the path you extracted to and it will show the results on the build page.
If you have the option, I would really suggest executing your tests via gradle or maven, as outputs from those tasks will produce a report that Jenkins (and other tools) can already read, and can streamline the job setup process for your users. But, if you can't get away with that, the above should work for you.

Jenkins/Hudson Upload to Testflight

I have a jenkins job using xcode to build my ipa file. That is all working great. Right now I just have the Marketing version set to ${BUILD_ID} and the technical version set to ${BUILD_NUMBER}. I also have Release configuration specified and my job is set to archive the ipa files as a post build action. I believe those combination of settings causes my resulting IPA file to be the following:
Target-Configuration-BUILD_NUMBER.ipa
So if my target was named BillyBob and this was the 23rd successful build, my resulting .ipa file is:BillyBob-Release-23.ipa
I want to setup a job or post-build action to upload my file to testflight on a successful build.
I can not figure out what to set the file parameter of the testflight API to so that it will always find the latest build file, I don't think there is a wildcard available or if there is I don't know how to set it.
Originally, when I wasn't setting the technical version as part of the build I had it just pointed to the -1.0.ipa version of the file it was creating and that would get uploaded fine.
I've tried using both the testflight plugin for jenkins and just a curl shell script command.
I will also point out that I'm not an iOS developer, I've just been trying to help the project by setting up the automated build, so my guess as to how that file is getting generated could be way off.
***UPDATE
So it looks like this current open issue is kind of what I am looking for
jenkins issue section
For now, I just had my job specify an output path that is the workspace of my upload to testflight job.
It looks like in the Testflight app, if you don't specify anything for the IPA file, it looks for one in the workspace directory of that job. So I could probably also put in a request to the testflight plugin to allow you to specify a path in the IPA setting and have it find the .ipa file in that path, that currently does not work.
If I was better at scripting I could probably also handle it in a shell command using the curl command to upload to testflight.
Leaving those fields empty in Jenkins fixed it for me.
If you do not specify the ipa/dsym file(s) they are searched for
automatically in the workspace.
As you can see from:
https://wiki.jenkins-ci.org/display/JENKINS/Testflight+Plugin
Version 1.3.1 (Jan 12 2012)
* Default IPA upload

Jenkins MSTest Issue

I have configured Jenkins as the CI for a project which is using Mercurial as the source control management. I'm using MSTest plugin in Jenkins to see the test results and I have written a bat command to generate test result file
del results.trx
mstest /testcontainer:Example\TestProject1\bin\debug\TestProject2.dll /resultsfile:results.trx
it gives an error in console saying File "Example\TestProject1\bin\debug\TestProject2.dll" not found"
when every build happens a folder is created under %WORKSPACE% having a new name (SYSTEM_My_Computer_Name 2011-06-08 13_04_11). In that the test dll is in a directory called out. How can I get path to that dll, because the directory name is changed for every build?
It is working fine when I used a absolute url like "c:\Example\TestProject1\bin\debug\TestProject2.dll"
How can we refer the newly built dll ?
Do I need to add test dll file in to the repository ?
Jenkins run bat files with %WORKSPACE% as the current directory.
As the error message indicates, the relative path to the test container is wrong. I can think of two things that can be the issue here:
The folder structure under %WORKSPACE% does not match your relative path. Adding a cd by its own in the bat file will reveal on the build output where this is. You can also use the links in the Jenkins web ui to browse the workspace.
You are building a different msbuild target in Jenkins, for example release. Then \bin\debug might not exist.
The folder "SYSTEM_My_Computer_Name 2011-06-08 13_04_11" is not created by Jenkins during the build, but it is created by the mstest when it is running the test. The root folder when the mstest is invoked is the workspace root folder, so the testcontainer file should be specify from the workspace root.
For example, say if the dll file is under C:\jenkins\jobs\\workspace\TestProject1\bin\debug\TestProject2.dll(assume your jenkins is installed under c:\jenkins).
The command should be (relative to the workspace root folder):
mstest /testcontainer:TestProject1\bin\debug\TestProject2.dll /resultsfile:results.trx

Ant script generate a findbugs_result.xml, but the hudson can not display on main interface. why?

Findbugs script in build.xml:
Findbugs checks Coding...
Findbugs checks Coding...
genetate a findbugs_result.xml.
Download Findbugs plugin for hudson.
Enter findbugs_result.xml path for hudson.
But hudson can not display on main interface. why?
I've found some annoying inconsistencies in the way Hudson stores paths; sometimes you use the overall workspace directory for the Hudson job and other times you have to use the path to the code that the job checks out of source control. For example, if your code gets checked out to MyProject under your workspace directory, and then the test XML files go into MyProject/target/test-reports, try specifying the path with and without the MyProject at the beginning of the path.