CI with Jenkins and Webtestit


#1

Hi. Here is what we want to do: We have a Windows server where a Jenkins instance lives and we want to run our Webtestit solution in a pipeline with other CI tasks. We do not really want to put Webtestit on the server. How do you suggest that we get our java solution to build in Jenkins pulling the java project from GIT and building and running on the fly?


#2

Hi @micheleaz,

can you explain why you’d not like to use Webtestit in CLI mode on the build server?


#3

Hello:
Can you explain what you mean by CLI mode?

We want to have a precompiled java application run by Jenkins similar to what we have with Ranorex. We do not have Ranorex installed on the server-- we have Jenkins get the code from GIT and run MSBuild. Is it possible to have our solution built on the command line with a java compiler and run without Webtestit being installed?

Thanks!


#4

Hi,

the CLI mode means exactly to start a Webtestit run via the console. You can read more about it here.

That ultimately means though that you’d need to install Webtestit on the target build server. Ranorex Studio works a bit differently in that every test is a standalone executable. While this is fine for Studio, which is Windows only and requires .NET, it would be quite a limiting approach for Webtestit which runs on multiple OSes and different language stacks. So we can’t really force the user to install .NET Core (since it’s the only available solution next to Mono for cross OS) just for the sake of executing tests.

The projects created with Webtestit on the other hand, e.g the Java one, are essentially Maven projects with TestNG. So you definitely could build those by yourself with a series of mvn clean && mvn test but then you’d need to pass in proper arguments like Capabilities, Headless flag, the actual browser + the path to the driver as well as report configuration. But even then if all is managed, you’d lack some features like starting a test on multiple browsers, a unified report where Maven-Surefire will by default generate one per run and proper post-processing of the report to add paths to failure-images etc.

The truth is that building proper setups for Selenium projects is quite a hard job, which needs to respect tons of configurations and individual user preferences. That is exactly the reason why we’re building Webtestit. You as a user don’t need to care about details but just execute <WEBTESTIT-EXECUTABLE> run <PATH-TO-PROJECT-FOLDER> and we’ll take care of the rest for you.

While that may sound as a repeated question, I’d be still interested in knowing what hinders you from installing Webtestit on the build server. Are there any specific restrictions? If so we can look into ways to address them. Thanks in advance!


Integrate Webtestit Project
Runnung a test without webtestit installed
#5

Hi @vsoftic:
Thanks for the info. Basically it is standard operating procedure at our organization to NOT HAVE IDE’s and client software installed on a server. While I understand why in this case it might be warranted, it is going to cause issues for us as far as violating this standard protocol. If you all could figure out a way to have a server side thin client that would do the compiling or a way of a standard java compile built in WITHOUT the IDE being installed, that would be optimal. I daresay that our organization would not be the only one in the industry to have this limitation of not installing IDE’s on the server for the simple task of compilation.
Thanks for the info!
Michele


#6

Hey @micheleaz,

Thanks for the feedback. So what you’re saying is if there would be a minimal binary, in essence what I mean is to extract the CLI part into a standalone executable, perhaps even installed by other means, and doing the execution part you’d be fine even if the actual way of consuming it is like described in above linked CLI article?

I think this is some super valuable discussion and sorry for poking so much but the more input about your situation and use-case we have the better we can evaluate a strategy on how to address that. Thanks again for taking the time to provide us your input we’re super happy and definitely looking forward to it.

EDIT:
If there’s anything too sensitive you can’t share with the public please don’t hesitate to contact me via PM, but in general we prefer to keep the discussion public as like you said there most likely are other users/companies out there which might have the same situation and can contribute to the discussion.


#7

Hi @vsoftic Exactly! We would be very happy with some sort of minimal compiler. No, you are not poking. I believe this is a valuable discussion as well. It is important for you all to understand that in most organizations, there are restrictions that are imposed outside the immediate department that is running Automation.

There is nothing in the post that would violate any corporate secrets :slight_smile:If you have any further questions about our implementation or limitations, please let me know.

Thanks,
Michele