How to compile using commandline

Best practices, code snippets for common functionality, examples, and guidelines.
itschinovic
Posts: 5
Joined: Wed Oct 11, 2017 10:37 am

How to compile using commandline

Post by itschinovic » Wed Oct 11, 2017 10:49 am

So we need to do our test on a server wherein Ranorex will not be installed is there a way to compile the test using a command line

and additional question, How can you create an executable file wherein it will run the test and will not require the installation of ranorex

Thanks :idea: :lol:

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to compile using commandline

Post by krstcs » Wed Oct 11, 2017 3:44 pm

1. Ranorex is a .NET-based system. You can compile the SLN or CSPROJ files using MSBUILD as with any other .NET appliction.

2. There are numerous posts on this forum that outline how to run Ranorex tests without installing the full Ranorex package. However, this still requires that Ranorex libraries be copied to the system where the test is being compiled/run. There is no way to get around this. My suggestion is to just install Ranorex because it is much simpler than having to copy Ranorex libraries each time there is an upgrade, and it ensures that everything is correct on the system.

In my opinion, you (the tester) should have control over any system where you are running tests. If you don't then you can't really control the environment or the tests.
Shortcuts usually aren't...

itschinovic
Posts: 5
Joined: Wed Oct 11, 2017 10:37 am

Re: How to compile using commandline

Post by itschinovic » Thu Oct 12, 2017 4:40 am

krstcs wrote:1. Ranorex is a .NET-based system. You can compile the SLN or CSPROJ files using MSBUILD as with any other .NET appliction.

2. There are numerous posts on this forum that outline how to run Ranorex tests without installing the full Ranorex package. However, this still requires that Ranorex libraries be copied to the system where the test is being compiled/run. There is no way to get around this. My suggestion is to just install Ranorex because it is much simpler than having to copy Ranorex libraries each time there is an upgrade, and it ensures that everything is correct on the system.

In my opinion, you (the tester) should have control over any system where you are running tests. If you don't then you can't really control the environment or the tests.

Thanks for this mate :D
we will be running it on a remote windows server

manalitatke
Posts: 36
Joined: Mon Jan 16, 2017 3:24 pm

Re: How to compile using commandline

Post by manalitatke » Fri Dec 08, 2017 7:19 pm

Hello,


Thanks for the clarification.

I am trying to do the same.

Had a few queries:

1.Copying the project includes all the rxsln, sln, csproj, solution folder and the dll's libraries right?

2. Can ranorex agent help in remotely building the project and running the tests without ranorex studio installation and copying the libraries?

3. For integration with Jenkins, how does a ranorex agent/ other methods help to implement the build process without the developers version of ranorex?

Thanks

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to compile using commandline

Post by krstcs » Fri Dec 08, 2017 11:10 pm

1. You only need to copy the compiled EXE file, the rxtst file, and the libraries. The sln, csproj, rxrec, rxrep, cs, etc., files are compiler files and aren't used during the test. Look at the 'bin\debug' folder in your project folder to see what files are needed from the project.

2. Ranorex Agent will not build files, it only runs the EXE remotely and returns the results to the local Ranorex Studio system.

3. Jenkins does not require the Ranorex Agent at all, and the two are not related. In Jenkins, you just use a "Windows Batch" step and run the test as if you were running from the command-line locally. You still need to have a Pro license to create and compile the tests, regardless of where/how you build them, but you can use runtime licenses on Jenkins slaves to run the tests.

I recommend that you install Ranorex on all systems where you will be running tests and then set the system to use the appropriate license type.
Shortcuts usually aren't...