Sergey Nivens - Fotolia

Manage Learn to apply best practices and optimize your operations.

What Android mock testing tools work for my app?

Learn the best way to upload mock tests and which testing tools make the most sense for your enterprise.

Mock tests are best written before you start writing any code. This is a process known as test-driven development (TDD). The idea of being able to write all of your tests after your code is already written is a hard one, and typically you'll end up either missing things or feeling like you're wasting a lot of time trying to cover everything.

One useful tool if you're working on Android mock tests -- after you've already written your code -- is to use a coverage testing platform, to show you where in your code you've missed, and try to write tests for all of those functions.

There really is no shortcut to writing unit tests.

Keep in mind that there are two different types of Android mock testing for your application. First there are unit tests, which essentially help prevent "regression errors" where a new update breaks old code. The other type is end-to-end testing, which helps to detect new issues. End-to-end tests are, in my experience, the most useful tests and fortunately they're one of the easiest types of tests to do. Instead of focusing on specific functionality of code blocks, you're focusing on testing of your entire application. The simplest form of this type of testing is to have a group of testers (preferably ones not familiar with your development team, or code base) and give them the app. Record their interactions and make sure to have them try to do things in the app that you would expect as well as try their own things. After recording a few users, you can write a "script" for users to follow after each significant upgrade to make sure the end-to-end functionality works and is intuitive for your end users.

Next Steps

About unit test scaffolding

Why you shouldn't write unit tests

Dig Deeper on Mobile infrastructure and applications

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

How has your enterprise uploaded mock tests?