UIAutomation iOS(test cases in Javascript UIAutomation) - ios

I am working on UIAutomation. My question is can we take inputs from local json file in UIAutomation Script file. Means in UIAutomation Javascript can we execute data from other files. i want to give some inputs from other files in uiautomation java script file.

It sounds like you want to have a data driven test for your UI.
Appium is an open source library that should allow you to write automated tests in whatever language you want. If you want to take input from a local file, write your test to read the inputs from that file.

Related

Launch/Execute a file using lua?

I am creating a lua script that makes creating scripts for a game easier, I would like to, after creating the desired file.lua, for windows to execute and open that file.
Is it possible?
Ok, what i need is to os.execute() a lua file and open it in windows using the default .lua reader.
os.execute('filename.lua') should open the file in the default application registered for .lua extension. The first value returned will be true if successful. It will keep the console window open though; if you want to avoid it, use something like this instead:
os.execute('start "" filename.lua')

Recording with Eggplant?

When a coded UI test in Eggplant fails, it gives a screenshot of exactly where the script failed at. I want more than just a screenshot, however. I want a video recording of the test running, so I can have a better idea of why the test is failing.
Is there feature in Eggplant that allows me to video record a test? Or maybe there is some way SenseTalk or an Eggplant extension that can do this for me and log it in a .wav file?
Here are a couple of ideas:
Find a screen-capture tool that you can run from a batch file, and
call that batch file in your eggPlant Functional script. (I found
several options by searching for "start screen recording from batch
file".) The SenseTalk command would look like this: Shell
"StartRecording.bat".
If you are running eggPlant Functional on Mac, you can try the
deprecated StartMovie and StopMovie commands.
Happy Scripting,
Pamela
Eggplant has built-in recording features.
You no longer need to be on a Mac to record a movie; any machine running Eggplant on any SUT can record a movie.
From the documentation:
StartMovie "/path/to/record/the/movie"
//Section of test script you want to record
StopMovie
This will save the video as an .mkv file, which can be opened in VLC Media Player, if nothing else.

Is Modifying the content of a file possible in mqfte using ant task?

I have to substitute the letter "A" with letter "C" in the content of a txt file.
Let test.txt be a txt file. The content is as follows:
Ace Apple
I need the content in the destination folder to be as :
Cce Cpple.
Is this possible in mqfte using ant tasks?
The short answer is "yes."
The longer answer is that you can do anything with Ant that can be scripted, including calling other scripts. The approach would be to use a post-destination call that would edit the file after it arrives. This call won't fire if the file transfer fails. If the transfer succeeds the post-destination call does fire and will run your task or script to edit the file. Just remember that if you configure this to run as a monitor, it will fire on every file transfer. If you want to run it as an ad-hoc transfer you will need to submit it from the command line since the GUI does not support the pre/post calls.

What is the standard/conventional location for a test text file with rspec?

We've inherited an application that uses a script to import data from a text file, but doesn't test the import script.
I'd like to write some tests for that script, and will need test text files (these are not fixture files).
Where would you normally put those files? A data directory? In the new support directory?
You should decouple your import from the file IO. Then you should be able to feed in test strings into your importer with out having to make 'test files'.
I disagree, they are fixtures as they are sample test data you're testing with. They would live in spec/fixtures

Customizable / Dynamic SWF generation

Wondered if anybody knows how customizable Flash swf files are made, where there appears to be a template swf that the user can then input some changes (eg text or image) and receives a newly-compiled swf file with their changes.
Some examples:
- http://flashfreezer.com/landingconfetti/index.html
Constraints:
- user receives a single output swf file that can be played with all their changes included. ie there is no reading from an xml file, or using Flashvars.
Been trying different things for a few weeks with no luck!
There are a number of ways, but generally the most common is to either use a SWF generating library (like PHP's) or through server-side compiling.
Normally, this will be a custom or proprietary library which uses the same language that the serve is running (and there are open-source libraries for this in PHP, Perl, Python, Java, C++... etc). The SWF is generated and served up with the appropriate headers so that the browser knows how to re-direct it. Often this will involve a pre-defined template which is then modified slightly for the new input. Only occasionally does this involve the manipulation of pre-generated SWF directly.
The other option is to have a command line call to the Flash IDE or the Flex compiler (and, technically, this can work for CS3 and CS4, though in a very nasty and hackish way) to generate a new version of the SWF on the fly. This is often slower, but it will generally yield a more finished feel to a product.
You could try Swiffotron. It can modify SWF files and do text replace type things on both text elements and in compiled actionscript.
Here's a swiffotron xml job file that does some text replacing.
And here's a swiffotron XML job file that modifies instances on the stage.
I didn't check the site, but the only way I can think of is to read the requirement details through flash (this can be done through plain html also) and then generate the AS files from their templates and compile them at the server side (using mxmlc or other compilers) and give back the SWF.
I get the impression that you're looking for SwfMill. SwfMill creates a swf based on an XML file that you create/define. You could use SwfMill on the server to generate a swf based on user input.

Resources