Unable to use Performance Plugin with Hudson - maven-2

I have been trying to integrate JMeter test with Maven and Hudson. I came across this beautiful post on Maven JMeter and got it set up easily.
And then I got to know that Hudson has a performance plugin using with JMeter results could be directly displayed on Hudson dashboard.
Now problem I face is in using Performance plugin of Hudson.
Performance plugin says to specify path of JMeter Report files wherein default path is considered as "**/*.jtl" if no path is specified.
My Maven JMeter tests produce this file under "target\jmeter-reports\GoogleAdvanceSearch.xml"
Notice that an "xml" file is generated here but it is same as ".jtl" file.
I provided the entire path this xml file under "report files" section of Hudson but when ever I initiate a build I encounter following exception after performance test execution -
Performance: Recording JMeter reports 'C:\SelNG\jmeter2\target\jmeter-reports\GoogleAdvanceSearch-100905.xml'
Performance: no JMeter files matching 'C:\SelNG\jmeter2\target\jmeter-reports \GoogleAdvanceSearch-100905.xml' have been found. Has the report generated?. Setting Build to FAILURE
But I know that file is physically available at the location I specified.
To double check if problem is coz of "xml" file and not having ".jtl" file as specified in performance plugin of Hudson. Now I created a build file which would execute JMeter tests and generate ".jtl" file. Now get to see following ".jtl" file generated. "C:\SelNG\jmeter\GoogleSearch.jtl". I specified this path under "Performance Report > Report files" section of Hudson plugin but again encountered same exception on build execution
Performance: Recording JMeter reports 'C:\SelNG\jmeter\GoogleSearch.jtl'
Performance: no JMeter files matching 'C:\SelNG\jmeter\GoogleSearch.jtl' have been found. Has the report generated?. Setting Build to FAILURE
Finished: FAILURE
Though I know that file 'C:\SelNG\jmeter\GoogleSearch.jtl' is physically available at specified location.
What is that I am missing in here? has any one of u come across such problem while using Hudson-Performance plugin?
Thanks in advance
~ T

I hope this will help you a little.
Hudson select job. Choose configure.
Let's focus on paths
This is my path to tests
c:\Hudson\data\jobs\template-peformance-test2-mvn\workspace\trunk\src\test\jmeter\
This is my path to report files
c:\Hudson\data\jobs\template-peformance-test2-mvn\workspace\trunk\target\jmeter-reports\
For Hudson the root starts in job workspace.
My Build conf:
Root POM: trunk\pom.xml
Goals and options: celan verify
Then in Post Build Actions
selected Publish Performance test result report
Performance report JMeter
Report files */target/jmeter-reports/*.xml

Related

Exploring options to deliver Selenium test to non-tech business team who wish to run the test on their own

Our non-technical business team need to run only 1 automation test script which will be fetching data from several hundreds rows of Excel file. I've created automation that script using a Maven project (with POM framework and Extent Report), using Selenium WebDriver, Java, TestNG, and Eclipse but not sure how to deliver the test/script to the business team. Would appreciate if you guys can suggest a few options to deliver this script to the business team so that they can change few parameters in Excel file and run the script on their own. I'm getting Extent report at the end of the test, would be best if they can get the Extent report as well.
Note: Since they are non-technical, it is preferable to avoid installing and configuring Java, Eclipse, etc tools on their machine but that's not mandatory so I'm open to check several options.
I would like to suggest few options here :
Jenkins - Install it on Any server and share login and url with them. They can execute build and no technical knowledge required.
Executable JAR - Export your project as executable JAR and deliver that JAR file. All they have to do it , Double click on JAR file OR execute via batch file and it should run that script and get done the job. Make sure all data related file should be there with JAR. i.e excel file
Note : They always need JAVA in the machine regardless of what they prefer from above to use.
Usually i used to give as batch file script, if you have jenkins, integrate your bat file in it. other wise share the batch file as it is.
Create a package JAR,
Create .bat file to execute the JAR.

Viewing log file after appveyor script fails

I am trying to diagnose an error during the build of a project with appveyor. This same project is also built with travis-ci, without any problems. I assume it is windows related.
The script produces some log files, but I have no clue on how these can be viewed after appveyor is done trying to build.
As a specific example: See the log of this build. At line 11706 it says:
Logs have been written to: C:\stack.stack-work\logs\yaml-0.8.28.log
How can I view the contents of that file?
You can push this file as artifact at on_finish stage, or simple RDP to the build worker and explore it interactively.
Side note: you can also try to debug your build in RDP, but note that environment variables from the build session are not available in the RDP session, so you need to re-create all or part of them.

What is the result of gitlab-ci-runner and what gets uploaded?

I am preparing for gitlab-ci setup but I've reached 2 questions that I can not find answer to:
1) If there is no support for artifacts on Windows (using shell executor), what will be uploaded after build script finishes?
2) Are artifacts the right way to tell the runner what should be uploaded? Or is it only something extra to tell the runner that some generated garbage might be interesting so it would be nice to upload it beside the true result?
If you don't specify artifacts nothing will get uploaded automatically. You will only see the build log.
E.g. if you use the docker runner the entire container will be removed after the build finishes. The runner will upload your artifacts to gitlab and that is it.
Obviously you are free to copy/upload any asset during the build as you see fit.

How does IntelliJ decide if you're running a test?

IntelliJ separates a project's resource files into "Resource Folders" and "Test Resource Folders". My understanding is if you run unit tests, then it uses resources listed under "Test Resource Folders", and otherwise, will use "Resource Folders". The problem is that when running the same code, it seems to arbitrarily decide to switch from one to the other every once in a while. The only workaround I've found is to move each directory from "Resource Folders" to "Test Resource Folders" or vice versa when it happens, but the project is large with lots of resources, so IntelliJ ends up taking 10-20 minutes on the "Copying resources..." step.
Why is this happening and how can I avoid this problem?
Test resource roots are resources only referenced from tests, and resource roots are resources that can be referenced from both production and test code. The compilation process copies the resources and test resources of each module into separate output folders.
When you run a test run configuration (JUnit or TestNG), the classpath will include both production and test output folders; which of them takes precedence depends on the details of the test runner. When you run any other run configuration type, the classpath will only include the production output folders.
There is no logic in IntelliJ to use one resource root type instead of the other one. Either they're both on the classpath, or only one is.

Where does Bamboo look for artifacts?

I have created a Bamboo build plan that is supposed to generate artifacts. And it does - I see the generated files on the server. Unfortunately, Bamboo does not copy the files to the desired location -> it does not treat them as artifacts that I can download from Bamboo server.
I am working with Bamboo 4.3.3. The documentation tells me to describe the artifacts location relative to the "working directory", so I am trying to copy everything to ${bamboo.build.working.directory}.
I have tried different location / copy pattern settings, but to no avail.
Where should I put them? I have a scripting environment, and there is no Maven or Ant to help me.
I finally understood what was going on with my artifacts and test results that Bamboo did not see:
Test results: there is a known bug that is affecting all versions up to 4.4.5, which manifests itself in scripting environments. Fortunately, it has a workaround: JUnit Parser: Test results are not found
Bamboo uses system property bamboo.fs.timestamp.precision to define FS timestamp resolution. By default it is set to 100 (ms), please set it to higher value in order to make file date check less strict. Bamboo does the check in the following way:
private boolean isFileRecentEnough(final File file)
{
return file.lastModified() >= (taskStartDate.getTime() - SystemProperty.FS_TIMESTAMP_RESOLUTION_MS.getTypedValue());
}
Other items to check
Double check the task configuration and confirm that it is configured it to look for the test results file in the current working directory of the job (Ex.: C:\Users\ssetayeshfar\bamboo-home-445\xml-data\build-dir\PROJECT-PLAN-JOB) and NOT a sub-directory (Ex. C:\Users\ssetayeshfar\bamboo-home-445\xml-data\build-dir\PROJECT-PLAN-JOB/test-results).
In case test report is not produced by the build (it was produced earlier) use a 'touch' command right before the JUnit task.
Artifacts: at the beginning of my work with Bamboo I did not understand that the working directory is defined PER JOB and tried to copy something produced in a previous job as an artifact of the current one.