I want to be able to distribute my Sikuli script and allow the end user to run the script without installing Sikuli, my only problem at this point is not knowing what dependencies Sikuli needs to run (besides JAVA). With this knowledge I simply want to create a zip file for my user's machines that they can unzip into a folder and run the script.
Assuming you are using SikuliX as a command line script and not the IDE(IDE should probably work same way too. but I have not much experience with it) , you can simply copy the whole SikuliX folder to another PC and it will usually work straight away. As you mentioned yourself, the only requirement is Java.
Related
I have a Sikuli 2 script which is composed of:
an app.sikuli directory
with a app.py in it
and several Things.png images
Most of this structure was auto generated by SikuliX while I was creating the script. If I have to switch to another method of creating a Sikuli project, please say so, it's new to me.
I want to "share" this script to any other OS (say I wrote it on Linux, and I want to share it with MacOSX, Windows...). And I want this script to be straightforward to execute (the less steps, the less complexity), but I can modify anything before sharing.
I found the snippet from the Git Docs for Sikulix. Let me know if you found any other solutions because I only know of distributing the finished code for running the .exe on machines with the IDE or just Java installed (NOT TO EDIT -- UNLESS ANOTHER IDE IS BEING USED LIKE ECLIPSE WITH SELENIUM)
YT OF SELENIUM SIKULIX INTEGRATION https://www.youtube.com/watch?v=k65uCl42hSg&list=PL2EKpjm0bX4LqPht11MRfu9R1qUOSAZn3
https://sikulix.github.io/docs/scripts/running-scripts
Where and how can a SikuliX script be stored#
When you need to distribute your SikuliX scripts you have two options: zip-file and jar-file, both variants pack the SikuliX script content in one file, which makes distribution easier. Both can run with SikuliX.
The jar-file variant has an option to be packed together with the scripting and SikuliX feature support (self contained), so it might be run on systems only having a valid Java installation.
variant zip-file#
It can be created in the SikuliX IDE with the file menu entry “Export packed source” and gets the ending .skl instead of .sikuli. As such it cannot be reopened for editing nor used for import, it can only be run using SikuliX features on systems having a valid SikuliX setup. In fact it is simply a zip-file, which can be brought back to a .sikuli folder using a zip utility. So be aware, that this variant does not really hide your script content.
variant jar-file#
It can be created in the SikuliX IDE (file menu entry “Export as jar”). It can be run using SikuliX features on systems having a valid SikuliX setup. The script source is contained in compiled form (Java byte code) and hence not visible, even if one accesses the jar content. So this variant gives some level of secrecy for your scripted workflow.
Is there a way to export Selenium code into some sort of file I could send to others to use without selenium? Preferably inserting it into some html file or something they wouldn't have to install on their computers. Thank you!
Kind of, depending on what you use currently.
If you use the IDE, then yes. The steps the IDE records are essentially put into a HTML file that it reads. You can just give that HTML file to someone else, have them import it into the IDE and it would pick up from there. This has the dependency that the user must have an FF version supported by the IDE.
If you use the WebDriver, then no. At least not without much work - even just due to the dependencies. For instance, you have the various drivers, that the user would need to have a copy of for the tests to work. You have the language that the tests were coded in, for instance Java - you'd have to ensure the user has Java.
You could package them up into a nice installer - whereby the installer gets the dependencies for the user, but this will be slow, unreliable and totally not worth the time and effort you place into it. Think of it when you are installing large programs - it's also downloading lots of dependencies for that application too. Visual Studio/Eclipse are prime examples, they depend on hundreds of things. So when you install them, they are not just installing the core files, but the things they depend on too. You could replicate the same thing.
In order to run a Selenium test you would need one this too things:
Selenium IDE running on Firefox, in this case you just export as html and import in the other computer
The runtime of the specific language you are using to export (i.e. for jre, .net for C# etc.) plus the selenium-server running
As for your question, I would say there is no way to export a test case into a single file to be executable by itself.
You Can Export your Test Case Or Test Suite in different languages.
If you are using Selenium IDE follow these steps:
After recording your Test Case click on file menu.
Click on Export Test Suite As.
Save this file.
Now you can send this file.
Background: I'm writing a script to collect some files in to a zip file. This script might be used in several operation system. The issue is that I don't what do they(the OS's) support? Linux has a build-in ZIP (on most distributions). Windows is a bit of a mess in this perspective. Since the zip command is not distrusted with the OS
Two issues:
1) I'm looking for a ZIP utility to be my scripts meat and bones, without actually implementing my own zip. Something with a unified command line style. (Java based perhaps?) If you know one, it will help me a lot to complete my task.
2) Right now I'm using some oracle client zip.exe for my windows machine to test my script. I've notice that I don't see the files inside of my newly created archive. Browsing around the web tells me that this has to do with windows being "blind". Preferably, any utility will solve that. Any ideas on why does this happen?
In the and I wrote a litle program in Java that does the ziping. I would publish the code but it's closed source. Since java was assumed in my system combined with the strong zip power it was the solution.
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java).
Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking make or omake).
I was looking for something that makes this process transparent to the developer, without caring of doing things by hand. I'm used to use Eclipse so I wonder if a plugin to achieve this exists or if are there other choices?
Mind that it may happen that the local machine it not able to build software I intend to (for example for OCaml) so it should rely just on remote connection.
Thanks in advance
You can use X11 forwarding. Even if you are connecting from a Windows machine.
If you are on Linux, connecting with ssh -Y might work right out of the box for you:
ssh -Y user#your_server
eclipse &
Well the simplest idea I can think of, though it is rather brute force would be to just open up a file share to the server and then edit the file directly through Eclipse.
If that doesn't work for Java at least you could make use of Maven to do some of those tasks. I am less certain about invoking Make though.
I think your answer is IDE-centric.
KDE's ioslaves support access over both SFTP and SSH (using fish, which uses a Perl script uploaded to the remote machine). I believe Gnome also has a virtual file system (gvfs) which supports remote filesystem access.
My recommendation, therefore, is to choose an IDE which supports a virtual filesystem that can operate over SSH/SFTP and allows you to specify the build command. You would then only need to specify the build command which would get its output from the remote make command (for example, vim has a makeprg option which can be set to any arbitrary command).
Depending on how 'remote' this is; why not ssh in and run the IDE remotely over X?
Using a build tool (Hudson for example) you could put a build agent on your remote server, check your changes into your repository as normal, and have it do a build when you check in changes (it will either do a repository hook or poll for changes, probably). Your build process will be the same, it will simply be automated. :-)
emacs has tramp, which lets you both open and save remote files, and open a shell on a remote system. Working with tramp is almost exactly like working with local files, except for the filename. To open 'foo.c' on the machine 'bork' as user 'joe' I open it with the standard emacs commands, giving it the pathname /joe#bork:foo.c
I use vim for remote development. (Well, I use vim also non-remote.)
If building is the problem, have you thought about simply using an automated build system where you commit to svn and the system then automatically builds the software? I've heard many good things about these sorts of systems, although I haven't quite tried any out myself.
As for remote development, a SVnDAV solution might be reasonable. It basically commits your every save and is completely transparent to the text editor you're using. However a probably much nicer solution would simply be to use a networked drive/directory and edit files remotely. On all unix-based systems this should work completely transparently to both the developer and the text editor.
Your choice of IDE will have the most impact on the answer to "can I?". If your IDE of choice is CLI based than you can always just SSH in, fire up screen (so that your CLI session is persistent across SSH sessions), and have at it!
Use vim or emacs since they will offer you speed. I know there is a learning curve associated with these editors; but once you get comfortable in any of them; you will be able to work on them as good as with Eclipse or any other IDE.
If you already have a linux server then I would suggest setting up a simple VPN server. I have done this in the past and it works pretty well. This way you can connect and modify/build your files with any "local" OS. I did this cause I use mac, pc and linux through various parts of the day and in multiple locations, so the VPN allowed me to edit files remotely w/out having to allow file sharing over the internet.
There are plenty of tutorials about how to achieve this even if you are newer to linux. I use ubuntu server on my linux box and here are the tutorial I have used.
http://www.ubuntugeek.com/howto-pptp-vpn-server-with-ubuntu-10-04-lucid-lynx.html
Netbeans 7.3 has a new feature which addresses your problem (and mine). Here's the tutorial.
https://netbeans.org/kb/docs/cnd/remotedev-tutorial.html
note: I realize it has been 3 years since this question was asked so the answer may be irrelevant to #Jack now.
One IDE that supports exactly your language set is Nuclide. It adds some packages to Atom and is used internally in Facebook exactly as you have described - full-fledged remote development in C++, Java, and Ocaml.
If a friendly file editor is enough for you then I'd recommend to use Jupyter.
Super fast installation
Built in server/file editor that starts with one command
I'm using Powerbuilder to call an external function from a DLL created in C#
If I generate an executable it works fine, it call the web service perfectly well, but when I'm trying to run it in "development" mode it don't use the "application_name.exe.config" file.
I tried to set "app.config" file hard coded in the DLL, but I was unsuccessful
Clues to resolve this issue?
I think you described it yourself: you're looking for it to use something used by the EXE when you're running from development mode. When you run from development mode, there is no EXE generated or used, so Windows won't be leveraging functionality linked to the EXE. (PB starts your application so quickly because it is only loading the application to the virtual machine and running its Open event.) If you need this, it sounds like you'll have to include Deploying of the EXE and running it as part of your testing cycle.
Good luck,
Terry.
When you compile and run from the exe you're using your exe. But when you run from the dev environment you're actually using pbxxx.exe (pb115.exe, pb110.exe etc.). You may be able to copy the "application_name.exe.config" into your pb directory and rename it something like pbxxx.exe.config. At least that's the way it works with manifest files -- I had two, one called appname.exe.manifest and one called pb115.exe.manifest.
Just curious but how many libraries/objects are in your application?
I have some very large applications and the longest any of them takes to do a full build is about 30 minutes. Something odd about your aapplication for it to take 2 hours to do a full build.
DLL's dont have config files. Only EXE's.