How to write a program to run same script using multiple external tools in eclipse - ruby

I write automated tests. We have different environments we run the tests in for different customers that we provide the same services to before they can be pushed to out automated testing servers. To ensure a test is working we need to run the tests using different external tools in eclipse each time and record and report on it passing/failing. To do this we need to click the green play button with the red toolbox and select an external tool individually each time.
I'm looking for a way that I can write a script that will let me specify which external tools to run the test with and then it'll run the test over and over with the different tools and output some kind of report. I'm not familiar with this kind of thing so any kind of direction would be a huge help.
I'm using Eclipse Keplar on Ubuntu 16.04. The test is a ruby script.

You can use scheduler of ubuntu system and execute shell script command to trigger automation.

Related

Jenkins GUI Automaion script execution

I am new to Jenkins. My query is
What I am trying to achieve.
1) We have automation framework (GUI kindoff). Which will trigger UFT / Selenium Scripts.
2) I have installed Jenkins.
3) I need to run some batch commands which will execute UFT scripts via built in framework.
4) When running via command line I am able to trigger scripts (UFT).
5) From Jenkins I am not able to run GUI commands.(It should trigger my framework and start UFT script execution)
Please note:
Build is success. I am doing all this from Master Jenkins. no slave machine.
Is it necessary to have slave machine to run GUI
I tried almost all settings by searching google.
Please help.
thanks in advance.
Abhijit
if you are using webdriver in your selecium script thats requires UI to be success than you have to consider using Slave which will have UI support and you need to connect there via Xvnc or something similar
if you are using webdriver which does not require UI (for example google chrome headless) then there should be some miss configuration in jenkins side, therefor to help you figure it out you need to provide more details

Reporting status back to TeamCity when a test is ran locally

We have a testing framework made in AutoIt for our Windows apps (older legacy apps that we will continue supporting). These have never been run on a schedule or part of CI (always been run manually). I tried to get some kind of auto run (or even just status reporting) out of the tests, with minimal luck.
I have a VM where the tests can run. I experimented with my own web app, which works okay locally for running and status reporting. But when set up on the server, AutoIt reports it cannot open the application. Same thing happens if I try to run the tests from a .bat file.
My current solution is to have AutoIt call my web app to report status (working okay locally, untested on the server), or to see if I can get AutoIt to report results back to TeamCity. I have the agent installed but when I run the build from TeamCity, AutoIt reports it can't launch the application. I tried this while logged into the VM, logged out, with RDS open; no luck.
Is it possible to run the tests manually from the VM and send results back to TeamCity? When I run them from TeamCity it reads the AutoIt output (which is in the expected format), but I need to let TeamCity know to update the results (so we can use TeamCity rather than my web app to show the results).
I may need to find a way to let TeamCity know a build has been started, which might then let it know to keep an eye on the process' output, but I'm not positive. Any ideas?
I solved this so it could be done more traditionally.
If anyone is confused by what "running the agent from the console" meant, it just means installing the agent without selecting the "as a service" checkbox, and then manually starting the agent by cd'ing to the BuildAgent/bin directory and running the command agent start. I also created a batch file that will do this automatically (but you must run it as admin).
Further, I found AutoIt couldn't do anything if the test doesn't run from the right directory, so I had to devise a solution to this.
The only issue now is that I have to have an old laptop always connected to the virtual machine the tests and app run on (since the AutoIt tests won't work without the VM desktop being interactive).

How to run UFT script without having UFT installed

I want to know whether is there any way to run script written in UFT without having UFT installed in your PC.
Can we export Script to some .vbs or .exe file? Or is there any alternate way through which we can execute scripts?
If you had developed the scripts using Object hierarchy, then you cannot run it without UFT. Scripts having only VBScript commands can be executed as .vbs, but we cannot do activities on Objects then.
But you can run UFT in Remote Desktop by providing it as parameters in 'CreateObject("Quicktest.Application",Remote Ip)'. Other than this, it is not possible to execute a UFT script outside UFT.
You can't execute scripts without UFT installed. That being said, from UFT 12.50 onwards, HP is providing a standalone component called as "Run Time Engine". Here is the snapshot.
The HP Unified Functional Testing (UFT) Runtime Engine is a core component
of UFT which enables you to run various tests (GUI, API and BPT) in functional
testing. In previous UFT versions, this feature was only available with the full
UFT installation. However, beginning with version 12.50, you can use the Runtime Engine as a standalone installation option for your automated testing environment.
Reference
Definately possible.
UFT has introduced a new feature called LeanFT . It just requires installation of LeanFT jars and requires a method to call them
You now can with the UFT Runtime Engine. More information can be found at this link.
From that site:
The UFTRuntime Engine enables you to run UFT tests (both GUI and API)
and business process tests on your computer without installing the
entire UFT IDE. In addition, you can also install the Runtime Engine
without the Run Results Viewer, UFT Add-in for ALM, sample
applications, or Help documentation. This can potentially save you
valuable disk space on your computer
You need UFT 14 v or above to make it use.
UFT 12 doesn't have that this feature

Automated integration testing of a client/server Windows desktop application

My team is developing a desktop application (mixed C++/Tcl) that is used in a client-server setup. Currently it is Windows-only, but soon we will need to port it to Linux. CruiseControl.NET builds it every night from the source code in SVN and packages it into NSIS installer, but we have no automated tests to run.
It is nearly impossible to add any unit tests, but integration testing of the application is easy, because it is already heavily script-based.
The main task is to install the app into 3 PCs, configure it (that involves copying some files around), run it, monitor a possible crash, wait till integration testing is done, collect a summary, send emails. It could be done with a bunch of custom PowerShell scripts, but
In future we will want to add more features and more testing, and
what used to be a simple script soon blows up (as usual), so I want
to minimize custom scripting, and if I need to script something, I
prefer bash/cygwin (I am not familiar with Python or Ruby).
I want a web dashboard that will report current progress, and if
something failed - show logs
I need some supervisor that will monitor the app under test and
report if it hangs or crashes
we will need to test it also on Linux
ideally I would like to orchestrate some test steps between the PCs
(e.g. run test X on PC1 and test Y on PC2 in parallel, wait till they
both finish, then run test Z on PC1, while monitoring that nothing
crashes on PC2 etc)
So, I am looking for a COTS tool/set of tools that will help me to do it and don't have a steep learning curve. Ideally, for free, but if it is really good and has fair pricing, my company may purchase a license.
The process should be triggered from CruiseControl.NET when the NSIS installer is ready, and then perform everything described above. Basically, it should allow at least remote installation of software, running custom scripts and have a web dashboard.
Apparently, SCCM tools like Chef could be used, but so far neither of them supports a Windows server, only nodes. I would like to avoid setting up a Linux VM just for that, although I can do it, if I have no other choice. Also, Chef seems to be a bit overkill - good for 10k machines, but I have only 3... maybe 5 in future. And I am particularly curious about chances to orchestrate a distributed test.
Most of the similar questions here on StackOverflow and in internets are about web apps, Java containers, Maven etc, and there are just so many tools and plugins for these tools to evaluate.
Thanks in advance.
Install ccnet on your test machines. Have those ccnet projects listen to a file that gets edited when a new installer is ready. Have the test machines install that new installer and run tests. There you go. ccnet sends emails so there's your basic reporting.
Have the test results get reported into a database via web services using gSOAP(that's what we did). For linux you can run java cruisecontrol if you must. Write a gSOAP enabled test controller program to report the test results from the test machines. A little c++ app will do. Then write a website(we use ASP.NET) to query the database(Postgresql) and show results. Have the test machines auto update themselves via SVN to get the latest changes to the configuration. Use Nant. Nant is far superior to just using ccnet to run tasks. Nant works through ccnet. Use XML, XSL and CSS with ccnet to make test emails have the information you want(new passes, new failures, SVN differences to code bases, etc...)
Our latest development is putting a big TV in the kitchen with a summary of test results so people can know more readily what they broke!
The first thing I'd get working is a test machine listening for the new installer, installing it, running some basic tests and emailing the results back. Put the ccnet and nant configuration in version control and get that auto updating on the test machine so you don't have to log into every test machine and do an update every time you make a change.
This is hugely broad and pretty close to opinion based. Chef can handle steps like deploying the application to the test machines but it isn't a GUI test framework so you would need something else to handle that. Jenkins supports distributing tests to windows hosts so that seems like a good choice on that side of things but it isn't that great at multi-node tests or orchestration between them. I suspect you'll need to write most of this yourself given the requirements.

Mac : Run Foundation Tool app as cronjob?

This may not be completely programming related ...
In Xcode I wrote a little Foundation Tool application for maintenance. Copy files from A to B , delete logs and so on. Now I want to run the application in background once a day or once an hour.
How do I set this up?
Can it be done with a Foundation Tool application or is there another Xcode project type for tasks like this?
Assuming the "Foundation Tool application" is a command-line application, then you should be able to run it from cron just fine.
Another way to run it (if you want to be consistent with the OS X built-in daily maintenance scripts) would be to run it from a script in /etc/periodic/daily (look at the existing scripts there for examples)

Resources