Besides providing you with several recommended test cases after crawling your app, Mesmer also lets you create custom test cases to manually operate and test your app for correctness.
To create a new test, click the Test Cases menu and then click Create a New Test.
Next, the New Test Case screen appears. This is where most of the work is done in building and completing your test case. Here, you'll simulate the flow and gestures needed to complete your test case as if you were doing it with a real mobile device.
Let's now get started setting up.
Before you start working on your new test case, you'll need to set it up first. Setup is so simple it involves doing these things:
📱 Choosing what type of device you'll be simulating for.
⚙ Configuring optional device settings.
✨ Adding bells and whistles like tagging to help you better recall and organize your test case later on.
The first step is to choose the device where your app will simulate. Click or select one from the list and then click Next.
To change the language for the device, click Language and select one from the list. Then, click Apply to save your selection.
To set the device's GPS location, click GPS Location and specify your desired coordinates in the provided field. The suggested format is to enter the latitude first and then longitude second, separated by a comma. For example, to set the location to Sapporo, Hokkaido, Japan, you enter this:
Click Apply to save your setting. Then, on the Configure Device screen, click Next to start tagging your test case.
You can optionally tag your new test case before Mesmer prepares the device for testing. Enter the tag or tags for your test case in the provided field and press the
Enter/Return key or the
, (comma) key to save them. Autocomplete also appears if you have already had tags saved from previously created test cases. To remove a saved tag, you can hover over it and click its✖icon.
Finally, click Start to prepare and turn on the test device.
Once Mesmer finishes preparing the device, it will automatically run your app. To begin building your test case, all you have to do is execute the sequence of actions needed to complete it. Mesmer records the type of gesture you made to an object within your app as a single step. The more gestures you make to complete your test case, the more steps it will have.
Speaking of gestures☝, it's time we talked about them. 🗣
You have three types of gestures to choose from when operating the device. They simulate exactly the same gestures as you would do on a real device. But in Mesmer, you'll have to do that with a mouse.
The gestures are available in the Device Gestures and Controls toolbar, located on the left-most side of the New Test Case screen. Click the Gestures button to select one.
The three gestures are:
Tap: This is the default gesture selected. To mimic the tap as you would do on a real device, hover the mouse cursor to any location in device's screen and left-click.
Long Press: Similar to how you perform the tap gesture, but holding left-click for a few seconds more before releasing. You usually use this gesture when selecting, copying, or pasting text.
Swipe: A "fling" to one of the four cardinal directions (top, bottom, left, right). Performing this gesture with the mouse involves using only two left-clicks. Here's how you do it:
First, left-click on the area of the screen where the swipe must start. This is your starting point.
Next, move your mouse cursor to your desired fling direction, limited only by the four cardinal directions. As your mouse cursor moves, the starting point will follow and point to the direction where it's currently at.
Finally, left-click again to commit to the direction where the mouse cursor is. This becomes the finishing point, and the swipe gesture is performed.
You can easily switch among the different types of gestures using these keyboard shortcuts:
The only keyboard you'll use to input data when doing your test case is your computer's keyboard. Mesmer does not simulate the on-screen keyboard you would normally expect from a mobile device.
When you tap on a text field or any UI object that expects user input, just begin typing, and Mesmer will save your input to a variable. This way, you can reuse the value multiple times over the course of your test case or make it globally available to your current project.
Click either the Lock Device or Unlock Device button to toggle between locking or unlocking the device, respectively.
Rebooting a device is useful when it enters into a bad state or if you just need to clean up or correct your recorded steps.
To reboot the device, click the Reboot button on the toolbar. Not only will this reboot the device, but it will also erase all your previously recorded steps. For example, if your test case has already recorded eight steps, then rebooting the device brings you to a fresh start again.
Lastly, you can close an open application on the device. Click the Close Application button to do this.
This action applies to any application, whether it be yours or anything installed on the device. This is useful if you need to test your app for some background-related functionality that requires you to get outside it.
Before you start performing more gestures on the device and adding assertions to your test case, it’s best that we now discuss with you the workspace or screen you’ll be spending most of the time with.
Aside from having the Device Gestures and Controls toolbar to work with, the New Test Case screen allows you to enter into full-screen mode and the function to pause Mesmer’s recording. Going full-screen mode, obviously, gives you more screen estate🖼when working. Pausing gives you the chance to take a break🍵or figure out your next steps or assertions while ensuring no accidental gestures are recorded.
But wait✋, there’s more😅. The following page will also discuss other standard screen elements present among other Mesmer screens and not just on the New Test Case screen. Your familiarization with them is vital to your productivity in the Mesmer platform.