Running code on remote server (container)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Running code on remote server (container)

sdemp
Hi,

I am currently using Selenium to automate the input of 1000's of lines of test data every day.  I have selenium grid running in a docker container and I have multiple chrome nodes running too.  The test data is being compiled into spreadsheets and I am running the code (written in java) on my machine from the IDE.  Each batch takes about 4 hours to complete.

What I would like to do is move this code onto a remote server in a docker container.  I want normal users to be able to upload their spreadsheets and start the code themselves rather than depend on me to do it.  I also want them to be able to leave the code running on the container and not have to worry about it running on their local machine.

I'm looking for some advice on the best approach to achieve this.  Should I be rewriting everything in PHP or nodeJS that can easily run on a web server or is there an easy way to run a complied version of the Java that I have already written with a front end that would allow users to upload the spreadsheet?  I have looked into Jenkins but nearly everything I have read is assuming that a testing framework is being used.

Thanks

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a886c274-635b-4571-9ecb-f99883452569%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Running code on remote server (container)

David
So you have custom Java code that doesn't use a test framework? You should ensure your code can compile into a JAR file that is command line executable. Otherwise, the alternative approach is Java (servlet) code that runs on web server, which depending on what you do, can be a trivial or daunting task.

You could craft a simple web UI that handles file uploads and invokes a shell execute against the JAR with the uploaded spreadsheet(s) as arguments. This you could do in any choice of language. You can track progress or manage the execution by perhaps forking off the execute so it's not blocking to the web request/server, and log down the process ID of the running JAR for checking status or killing it if needed when hung. Other status could be logging/redirecting the JAR's stdout to file and simply be able to present that file data in web UI for status progression.

Rewriting everything including that Java code logic is likely a lot of work unless your program is simple. Best to either adapt the Java code for Java web framework executability or integrate it with another web framework using shell execute of the JAR.

On Wednesday, June 13, 2018 at 7:37:35 PM UTC-7, sdemp wrote:
Hi,

I am currently using Selenium to automate the input of 1000's of lines of test data every day.  I have selenium grid running in a docker container and I have multiple chrome nodes running too.  The test data is being compiled into spreadsheets and I am running the code (written in java) on my machine from the IDE.  Each batch takes about 4 hours to complete.

What I would like to do is move this code onto a remote server in a docker container.  I want normal users to be able to upload their spreadsheets and start the code themselves rather than depend on me to do it.  I also want them to be able to leave the code running on the container and not have to worry about it running on their local machine.

I'm looking for some advice on the best approach to achieve this.  Should I be rewriting everything in PHP or nodeJS that can easily run on a web server or is there an easy way to run a complied version of the Java that I have already written with a front end that would allow users to upload the spreadsheet?  I have looked into Jenkins but nearly everything I have read is assuming that a testing framework is being used.

Thanks

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/389b8b0a-7301-41e9-8653-21c72e052bb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.