I have a window based application (c++) with list of log files;
number of logs would vary.
When each of the listed log file(each has different name) is double clicked a window pops up.The success criteria here is the successful opening of window on double click - this is to verified for each log file
How can I automate this process?
I would look into a program like Winium. It is a Selenium-based tool for testing windows apps. For further info, check this out: https://github.com/2gis/Winium
An alternative could be an Robotic Process Automation tool (RPA) like UIPath. It is not a testing tool per se, but it can be used as such and get your job done. There is a free community version available. Here's a link: https://www.uipath.com/
Related
I have reportportal installation running on Windows box. I am planning to use it as dashboard to look at unit test and other automated test results. I understand reportportal integration with unit test frameworks is done at the logger level so that the test app itself can send results back to dashboard.
I have a scenario where the test application is an exe that I want to launch by sending a command from dashboard to system under test.
Are there any provisions for doing it?
Do I have to build an agent that talks to reportportal using its api for this?
Thanks
No, nothing similar at the moment.
It is pretty popular request, so we have it in backlog, but still focus on test reports aggregations first. And the other types of functionality will come later.
Is there a framework to simulate a deterministically pseudorandom series of clicks imposed upon a Qt application - in order to try to trigger any memory leaks, threading errors etc - typical monkey-testing?
Some exotic, monkey use for QTestLib?
Yes, you can use the useful unit test module. Look in particular at the class QTestEventList. Just provide the QWidget you want to test, or the QMainWindow or whatever subclass you want and add the list of events you want to generate. If you want to generate a sequence of points so that you can reproduce in case of failure, use qsrand() and qrand().
The Squish automated GUI testing framework can be used to do monkey clicking in your application. There are a couple of nice things about using Squish for this purpose:
Squish runs on Windows, Mac, Linux and Android
It logs whatever random steps it happens to perform as a script that can be re-run (monkey testing docs)
It has an option to take a screenshot on application crash (screenshot on failure settings docs)
Disadvantages: Squish is not free. Setting up Squish to run your application can be super-irritating, especially if your application requires specific build characteristics of Qt or Python.
I have some scripts I'd like to run each morning at 6am. These scripts produce some pdfs of graphical output into a file: foo.pdf
I'd like my system (let's say Win 7, >= R 2.13) to email me these pdf's once the system has finished running the scripts.
Which is the best package - and most robust way of setting it up - to have these reports emailed to me directly via attachment from R?
Are there any 'cool' extensions to this (like sink() -ing report text output into the body of the email)?
Thanks in advance for any advice.
You can harness the power of a package that can handle emails coupled with a chron job. On Windows 7, I've achieved something akin to this using Windows Task Scheduler. Basically, you set it to run a particular script at a specified time.
I have a script running daily, and had lots of problems to get it to run. Take a look at Roman's link for the attachment and R code first. This is about the non-R part in Windows 7.
I had problems running the R script directly from Windows Task Scheduler, so I scheduled a batch file to run every day as follows:
#echo on
"C:\Rpath\R-2.15.1\bin\i386\Rcmd.exe" BATCH "C:\filepath\filetorun.R"
That's about the simplest you can get, but Quick R was a starting point.
Depending on your computer's settings, you might have to fiddle with the task scheduler. If it's a server type that's always on, then you shouldn't have too many issues (and you know what you're doing). If you have to log off and use a password to login or access a shared drive, you'll have to do some of the following. Also, I don't know if admin rights is a necessity or not.
Open Task Scheduler, make a new task, and open its properties window.
Under General, check the user account and select "Run whether user is logged on or not" and UNcheck "Do not store password." This will allow your script to run if you're logged off (I don't think it works when Locked). When you click Ok, it will ask for your password.
Basic setup: The Trigger is "On a schedule" and Advanced is Enabled. Under Actions, select "Start a program" with the Program/script as the .bat file.
Under Conditions, uncheck "Start the task only if comp is idle" and check "Wake the computer to run this task." Under Settings, check "Allow task to be run on demand," check "If the running task does not end..," and at the bottom, select "Stop the existing instance." These options might be necessary, though I'm not as sure about these.
Another trick is if your company has you switch passwords every once in a while. Open and close the task after changing so that it asks for your password again. Enter the new one or else it can't log in and won't run your script.
I am thinking of designing a webbased frontend to a dataanalysis package. This is what I have in mind:
Data-analysis jobs are submitted to a queue.
People can login to the frontend and choose to run a job on the local machine or add a new job to the queue.
Details:
A person logs into the web-application and can either choose to run an exisiting job in the work queue on the local machine or assign a new job to the work queue
If a job is selected to be run on the local machine, the webpage queries the package installed on the local machine : "This is the job I have for you. How long would it take for you to finish this?"
2.1 The package would return a value (based on heuristics) to the webpage
2.2 The webpage can, depending on the value returned, choose to
allocate the job to the current
machine
2.3 If the job is allocated to the current machine, the backend package
goes on its way all the while
keeping the webpage updated with the
progress it is making.
A job can take from a few seconds to
a few hours to finish.
2.4 Any time the webpage can tell the package "You are taking too long -
send me what you have" or perhaps "I have something more important for you -
send me what you have".
The package can send the data it has by connecting to the webapp backend
directly at this point.
This needs to run on Windows and Linux - so I will be using the npapi plugin architecture.
The webpage would do most of the interfacing via Javascript.
My questions are:
How do I make the C++ npapi plugin return a value (a json structure) to the webpage javascript and then have a function in the webpage execute without the webpage asking the plugin to do it (to achieve 2.1). That is - the plugin initiates the interaction instead of the usual "webpage asks the plugin to do something"
Is there a better way to implement 2.3 than setInterval?
How do I make the C++ npapi plugin return a value (a json structure) to the webpage javascript and then have a function in the webpage execute without the webpage asking the plugin to do it (to achieve 2.1). That is - the plugin initiates the interaction instead of the usual "webpage asks the plugin to do something"
Use this example.
Is there a better way to implement 2.3 than setInterval?
setInterval works well enough.
I am looking for options to download, Install and run a custom plugin/add-on(an exe or an installer) from my Flash Movie similar to how the connectnow does that?
When we initiate the screen sharing for the first time, connectnow prompts us for mandatory add-in by showing the message "To use this application, you need the Adobe ConnectNow Add-in.Would you like to install it now?". Once we agree, it downloads and installs acaddin.exe at the location %USERPROFILE%\Application Data\Macromedia\Flash Player\www.macromedia.com\bin\acaddin on our local machine. Then automatically launches the acaddin.exe and allows the user to close the browser window from where the acaddin.exe was launched.
From the next time onwards, when we login to connectnow, it launches the exe directly.
In this context:
If I were to load my own exe/add-in from flash, How can I acheive that?
How does connectnow application/flash determine whether an add-in was already installed or not?
Connect, and I assume ConnectNow, use hidden, undocumented, private APIs for much of their functionality.
You will not be able to do this.
The best you can hope for is to pass the location of your executable to the browser as a local URL and let the browser handle it. I assume in most cases the browser will reject its' execution. Can you imagine the potential for abuse of such a feature?
Instead of using a browser based app, you may want to investigate using AIR and Native Process.