Thorntail run goal - maven

I've seen command mvn thorntail:run in the documentation, but I cannot find this run goal specified in the pom files of provided examples.
Is there run goal at all?
Also I have a problem running my applications this way on Windows since java process is not shut down when I break execution in the console via Ctrl+C. I've read about this problem, but is there any solution to this?

I believe this is very similar to an existing question. This answer should be good for you: https://stackoverflow.com/a/53276378/742081

Related

The process cannot access the file because it is being used by another process when running a multithreaded maven build

I am having an issue when running a multithreaded maven build. The issue is simple, two threads are trying to access the same file to copy it, transfer it, etc. The issue is that I cannot find a way to tell maven to tell the threads to either wait till the file is accessible again or simply solve the problem.
Multithreaded builds are necessary for us so was wondering if this is possible to solve. Thanks in advance!
Drop the target folder manually as Windows might was not able to delete them on its own. Then try mvn clean install
Restart your system it will close all the processes and will resolve the issue.

Easy way to set Maven repository on home Tomcat

I have created a test artifact. Maven finds it on the local machine. Now I want to publish it on my home site. May anyone advice on it or on documentation.
I tried the manual way but failed to find good description of things like .pom files. The maven-automated way is not very clear documented either. Thank you in advance.
That turned out being very simple - I copied folder "sample" from C:\Users\admin.m2\repository\ to ...\Tomcat7.0\webapps\ROOT\maven2\ and was able to run the test build on another computer via http. Apparently there may be same simple but more elegant ways.

Can msbuild install applications on Windows, for example java JDK?

I am working to automate the install of some software.
It relies on some things like the Java JDK and well lots of things that have manual steps installing and copying things around.
I would like to be able to test if the various packages are installed and if not install or update them.
How likely is it that I can get MSBuild to do this sort of work? If unlikely then where can I look?
Thanks
The answer is Yes. MSBuild can execute any command -- as long as that command does not expect user to be in front of the computer. I know you can do silent JDK install, so you can just execute that command in your MSBuild target.
However a more interesting question is: should you do this? I think that performing machine-wide configuration steps as part of the build is bad practice. For certain things, like deployment of your newly built product for CI cycle it is ok, but for the purpose of the build it will be very inflexible.
What I would recommend in case of JDK: since JDK is big and mostly backwards-compatible, in your build script check if correct version of JDK exists on the machine. If it does not, fail the build and print out instruction in the log how to configure machine. For smaller dependencies, see this SO question.

Is it possible to use Chutzpah with Jenkins?

I'm no experience with Jenkins, I'm currently researching different options for PHP & JS automated unit testing with Jenkins.
I've come across Chutzpah (which uses PhantomJS's headless WebKit browser) but:
Is it possible to use Chutzpah with Jenkins?
There's very little documentation on Chutzpah. Although it does state on the Chutzpah homepage that it can be integrated into the TeamCity continuous integration server.
What's the minimum requirements for something to be compatible with Jenkins?
It is possible to use Chutzpah with Jenkins and with the 2.1 release of Chutzpah it is easier. Chutzpah's command line client can now take /junit argument that lets you specify a file name to output a junit-xml compatible file to. You can use Jenkins to pick this file up and report the test results.
I am not the downvoter, but I agree it is difficult to give a good answer to this question.
I believe the minimum requirement for something to be compatible with Jenkins is: It can be executed from a shell or cmd script. (If it's not, you need to find or write a plugin.)
Additionally, the thing should exit with code 0 for success and anything else for failure. (If it doesn't, you need to find or write a plugin.)
If you are interested in having Jenkins publish test results, the results must be in xml files using junit compatible notation. (If they are not, you need find or write a plugin.)
Additional requirements might be imposed by the tool you want to execute: It might need to draw windows or access the mouse or other parts of a graphical UI desktop/session. If that's the case, you need to run Jenkins in a context/session where it has access to those. (Windows, Mac and Linux all restrict background daemon/service access to the GUI desktop.)
Also, if your tool needs to access resources which are accessible by only certain user, you need to run Jenkins as that user.
This is a very open-ended question. Please try it out and come back with more concrete questions.

Configuring Rational Functional Tester (RFT) to run in Hudson/Jenkins

I've just installed Hudson and it is running beautifully. It builds, runs JUnit-tests and also CheckStyle analysis.
Next step for us would be to create an installation, install it and then run automated tests on the actual installation. I would then like to fail the build if the tests fail or at least publish the results somehow. I think we would set it up so that part runs periodically or manually triggered.
We use InstallAnywhere for installation and IBM Rational Functional Tester for automated tests.
So questions are: anyone created a similar setup? are there any plugins, tutorials or other resource that could help me along. Or do you have any tips or advice in general.
The command line reference for Rational Functional Tester:
http://publib.boulder.ibm.com/infocenter/rfthelp/v8r0m0/index.jsp?topic=/com.ibm.rational.test.ft.doc/topics/RobotJCommandLine.html
Sample command for running a test:
java -classpath "C:\IBM\RFT\FunctionalTester\bin\rational_ft.jar"
com.rational.test.ft.rational_ft -datastore \\My_project\AUser\RobotJProjects -user admin -project
\\My_project\AUser\TestManagerProjects\Test.rsp -build "Build 1" -logfolder "Default" -log
"Al_SimpleClassicsA#1" -rt.log_format "TestManager" -rt.bring_up_logviewer true -playback
basetests.SimpleClassicsA_01
An additional note, you'll want to configure windows properly on your agent machine which will be running the tests. This is not advice specific to Hudson or RFT, but rather all GUI automation tools on Windows. RFT will require an interactive desktop environment for it to be able to click buttons, etc. If you have your Hudson agent running as a Windows service, there will be no desktop. See the following: Silverlight tests not working unless RDP connection open
We have run a fairly complicated distributed build on Hudson, it is a process that basically follows:
Test on Windows.
Test on OSX, run code coverage & push results to server.
Test on OSX Tiger.
Package for OSX Leopard & push build to server.
Package for Windows & push build to server.
Update product website.
We don't use InstallAnywhere or Rational Functional Tester, but have similar sorts of mechanisms in their place. The key we found to making it all sing in Hudson was being able run our various steps from the command line. Maven and appropriate plugins made short work of this task. So my advice would be just that, using whatever build tool you are using (ant, maven, ?) configure them so that you can run your rational functional tester and install anywhere from the command line with a simple goal passed to your build tool (i.e. mvn test or mvn assembly:assembly).
After that, make sure whatever machine Hudson is running on has everything installed (i.e. Rational Functional Tester) and configured, so that you can open up the command line and type in the goal and have your tests correctly execute.
Hooking it up in Hudson from that point on is fairly simple - just pass in the goal when you configure the build.
I believe the best answer is that integrating RFT with Hudson/Jenkins is a useless endeavor.
As this IBM FAQ says, to make RFT work you must:
be logged in the machine;
the screen can't be locked;
if you are remotely connected, you can't minimize the connection screen.
So you can't run Jenkins/Hudson as a service, making it not very useful. You must run it from your logged account. If you are in a corporate computer (very probable if you are using RFT), you probably must use a hack to prevent the screen saver to start. If the screen is locked, your tests will always fails.
It isn't very difficult to configure your tests to run from the command line, you just have to take care of the return codes when the tests fail and succeed.
Jenkins/Hudson would also give you some advantages, like integrating the tests with your version control, probably automatically running the tests when a commit is made. It would also help sending emails when the tests fail.
But you still would have to integrate the RFT logs with some kind of JUnit plugin to have a nice report. You also would have to have script to run the tests using the command line.
I think it is not worth the trouble to use an continuous integration server with RFT. Better just have your tests running every day in Windows Task Scheduler. It is a simpler solution with less failure points.
Or use my final solution: quit RFT and use the free Selenium with a headless web driver.
I have some general advice on this because I have not yet implemented this myself.
I am assuming you want to have Hudson run the RFT scripts automatically for you via a build or Hudson process?
I want to implement something similar in my organisation as well.
I have not yet been able to implement this because of organisational constraints but here is what I have thought out/done so far:
Downloaded Windows process viewer, got the command for running the tests.
Made shell Script out of it, separated out the variables etc
The future plan is to setup a Windows Slave machine which would have all the tools in it that would be required once the Tests are kicked off, for eg. the correct versions of browsers, and environment variables, and other tools that are required.
Hudson would kick off a process which runs the shell scripts created which runs all the RFT Scripts and performs necessary operations on the slave machine.

Resources