Telerik blogs

The challenge of testing mobile apps is one that faces every mobile development team as well as companies attempting to produce thoroughly tested software for multiple mobile devices. Compounding the already difficult task of testing various screen sizes and hardware capabilities, testing compiled mobile apps presents a challenge in the installation procedure. While anyone lucky enough to live close to an 

Open Device Lab can drop by and spend a day looking at mobile web pages on all sorts of screens, it is simply not easy to manually install apps on various devices, one after another, and test...and test...and test some more.

There must be a better way! 

The Current State of Mobile Testing

 It's well-known that writing unit tests around code is critical to the success of a professional software project: 

Currently, the way you test a mobile app is heavily dependent on how you built it. For JavaScript developers, there are various frameworks, such as qUnit, which help you test your code quality. If your app is written in lua, you can use lUnit. Writing an app using C? You can use cUnit. There's also Mocha, Jasmine, Chai...so many delicious frameworks to try. 

All of these tools will definitely catch those moments where your code breaks because of some syntax mistake or error in assumption. But what if you want to not only test your code but also test how it works on many different devices? Unit tests won't be enough to cover all the devices on which you want to test. And simulators or emulators can only give you an approximation of how your app will perform, at best. 

Mobile Testing to the Rescue

What if there were a way to use the tools you already use and the language you already know to write tests and run them on up to 300 mobile devices? With the new Mobile Testing toolset on Telerik AppBuilder, you can. 

Device Fragmentation? Test in the Cloud

There are so many devices on which to test, but depending on your license, you can test your app on up to 300 mobile devices. Login to Telerik Platform solution, and in the Test Portal, create a Device List and add the devices on which you want to see your app. 

When you are ready to run a test suite, submit a "test run" with the suite you've written to this device list, and the results will be returned to you, complete with screenshots and important details of successful or failed runs. 

A successfully run test gives many details of how the app is performing on the devices you selected for testing: 

Team members are able to see the results in an intuitive way in this one-stop shop for testing. 

Know JavaScript? Write Tests in JavaScript 

If you have created a hybrid mobile app project, you can now create a mobile testing project. Right-click on the mobile app's "solution," and create a testing project to be associated to it: 

This project is created with a sample test that you can rewrite or amend to suit your needs. Since you're already writing in JavaScript, it's intuitive to write your tests in the same language: 

Building in AppBuilder? Integrate a Testing Suite Alongside Your App

To enable the Mobile Testing Suite for your app, all you need to do is make sure the Telerik Mobile Testing plugin is installed in your app. Click on the Properties "wrenchW icon in your app's right-navigation panel, and navigate to the Plugins pane to install it: 

The new Mobile Testing framework will streamline your mobile app development process by providing an intuitive way to test your various scenarios on many different devices in the cloud. Share the results with your team, refactor, reconfigure and retest. The way AppBuilder tightly links the app and its tests is ideal for those who need to be nudged in the direction of test-driven development procedures. No more excuses. Test that app! 

To try this for yourself, login to your Telerik Platform account or signup for a free trial.

Once logged in, click the blue "Create app" button and create a sample app using the Friends template. When the workspace completion is finished, click the "Test Portal" link at the top right of the screen. Now you're ready to follow the screenshots above to create your first test suite. Give it a try!

 


Comments

Comments are disabled in preview mode.