Automatically test iOS apps with QF-Test 8
In this video I will show you how you can test iOS applications with QF-Test 8. Also, I will demonstrate what else QF-Test 8 has in store.
Transcript
Introduction
Hi! In this video I will show you how you can test iOS applications with QF-Test 8. Also, I will demonstrate what else QF-Test 8 has in store. QF-Test 8 is the most recent version of QF-Test, the tool for professional GUI test automation.
Testing iOS applications
First, let’s get the system requirements out of the way: Testing iOS applications is only possible on macOS. Also, you need to have Xcode an a couple of other helper tools installed. To prepare your system, we have developed a useful little assistant that will lead you through the necessary steps. It will also set up your test environment for you automatically as much as possible.
As always in QF-Test, a new test project starts with the quick-start wizard, via the magic wand icon. Here I can now select an iOS device or Simulator from the list … and here I’ll select the iOS app bundle I want to test … and QF-Test takes care of all the rest for me.
With my newly created setup sequence, I can start testing. With just one click, QF-Test launches my test application and connects to the device or Simulator I just selected. Now, I can start a new recording using the QF-Test recording button. This opens the Recording Window. This Recording Window mirrors the screen contents of the connected iOS device in real-time.
When I now interact with my test application through the Recording Window, QF-Test will automatically record all of my interactions. The Simulator window was hidden to avoid confusion, but everything that happens in the recording window is transmitted live to the Simulator. Swipe gestures are also no problem for the QF-Test Recording Window.
Interactions can only be recorded through the QF-Test recording window, not directly on the device or Simulator. Instead, the recording window offers a bunch of other functionality, for example the recording of checks. Checks are used to ensure the correct state of my application. To use them, I activate the check recording mode from the recording window and then click on a UI element whose properties I want to check.
After finishing my recording, I get a test sequence made of individual steps which I can now tweak and modify however I like. But most importantly, I can replay the steps reproducibly and with great speed.
And that’s it! The first step on the road to complete end-to-end tests for my application.
Updates to the foundations
But of course that is not everything that is new in QF-Test 8. Even if you don’t plan to test iOS applications, there is a lot here to make an upgrade worth it.
For example, we have modernized the foundations and are now running on Java 17 and 64 bit, which should make QF-Test quicker, more stable and better integrated into your operating system.
Of course you can still test applications built on Java 8 as well. Also, QF-Test is still able to test 32-bit Windows applications. And on the Mac, QF-Test now runs natively on Apple Silicon. Naturally, QF-Test still works with Intel-based applications as well.
Json and Chai
As the developers behind QF-Test, we know that many of our users also work with code-based tools for testing software. One of them is the well-known JavaScript library « chai.js ».
QF-Test has also been offering code based testing since the beginning. With QF-Test 8, we let ourselves be inspired by Chai and now offer the QF-Test Assertions API.
def foo = 'bar'
def beverages = [ tea: [ 'chai', 'matcha', 'oolong' ] ]
expect(foo).to.be.a('String')
foo.should.be.equal('bar')
expect(foo).to.have.lengthOf(3)
expect(beverages).to.have.property('tea').with.lengthOf(3)
With it, you can use QF-Test to write assertions in a fluid, language-like syntax, like the one Chai made popular. And the whole thing not only works in JavaScript, but in all three supported script languages: Groovy, Jython and JavaScript.
It gets even better when you combine the Assertions API with our new JSON module and directly access individual properties in a JSON object in your assertions.
rc.setLocal("jsonData", """
{
"Actors": [
{
"name": "Robert Downey Jr.",
"age": 53,
"Born At": "New York City, NY",
"Birthdate": "April 4, 1965",
"wife": "Susan Downey",
"weight": 77.1,
"hasChildren": true,
"hasGreyHair": false,
"children": [
"Indio Falconer",
"Avri Roel",
"Exton Elias"
]
}
]
}""")
def data = rc.getJson("jsonData")
data.Actors.should.be.a("ArrayList")
expect(data.Actors[0]).to.be.a("LinkedHashMap")
Assert.instanceOf(data.Actors[0], "LinkedHashMap", "Bla")
data.Actors[0].name.should.be.a("String")
data.Actors[0].age.should.be.a("Long")
data.Actors[0].weight.should.be.a("Double")
data.Actors[0].hasChildren.should.be.a("Boolean")
rc.setGlobalJson("gData",data)
New Theme: Solarized
Even if you are only in the mood for some visual variety, QF-Test 8 is for you. We have turned the popular Solarized color scheme into a UI theme. It joins our existing default theme and the high contrast mode. With it’s deliberately tuned colors, Solarized brings even more choice to the visual presentation of QF-Test. And of course, this theme, too, is available in a light variant.
Conclusion
And there are even more things that are new in QF-Test 8. There are a ton of smaller improvements and fixes. Visit our website and take a look at the full release notes to learn about all the details.
Not convinced yet? Try QF-Test 8 for yourself today! You can download QF-Test for free at www.qfs.de and start testing right away.