![]() Test Center User Guide
Contents
1. IntroductionWhen developing an application in MobiOne Studio, you begin with Design Center, designing both the look of each screen and the user interactivity. Test Center then lets you test your application, and if necessary, develop it further using development tools. Although the basic HTML 5 and JavaScript source files are generated for you when you run your design from Design Center, your application might require custom scripting for advanced application features. This is where Test Center development tools come in. Not only can you view and try out your application design in the device emulator, you can use the testing and development tools to customize code to fit your requirements. ![]() Test Center
2. Using the Device EmulatorThe device emulator allows you to view and test your mobile web applications. Your design opens automatically into the emulator when you click the Run Design icon Click the Home button to open the device's Home screen. From there, you can use the browser application to open any website or click an app icon to open a site from the Home screen. Right-click menus allow you to reset the Home screen, change wallpaper, or delete an app icon. ![]() Device emulator
2.1 Devices & Device ManagementMobiOne Design Center and Test Center support development for iPhone and iPad devices. In Test Center, you can change the device view to see how apps appear on either device, as well as in either landscape or portrait orientation. 2.1.1 Changing the DeviceWith the device emulator open, click the arrow on the Change Device icon ![]() Device views - iPhone and iPad
2.1.2 ScalingWhen viewing the device emulator in iPad mode, you can set the scaling of the device. Click the arrow on the Scale icon ![]() iPad scaled to 100%
2.1.3 RotatingWhen designing an application, you want to consider the screen orientations of the device. If you are designing an application to run in both portrait and landscape orientations, you want to test both orientations. To rotate the device screen in the emulator, click the Rotate icon ![]() iPhone landscape orientation
2.2 Using the Home ScreenUse the device emulator Home screen just as you would the Home screen of your actual device. Open the Home screen by clicking either the Home button on the device emulator faceplate, or clicking the Show Home Screen icon 2.2.1 Changing Home Screen Wallpaper
![]() Wallpaper setting
2.2.2 Adding/Removing App Icons
Note: If the button bar is not available, select Browser>Button Bar from the menu to toggle the button bar on. ![]() Open Action menu and Add to Home screen
App icon added to the Home screen
Tip: Using the Home screen is a great way to test the custom app icon and startup image that you included in your app design. When you click the icon on the Home screen, the startup image appears, and then the app opens. To remove an app icon from the Home screen, right-click the icon, and select Delete from the menu.
2.3 Using the Web BrowserYou can use the device emulator to browse the web. This is useful for seeing how other websites appear on mobile devices. 2.3.1 Address and Button BarsThe address bar allows you to enter a web address, search for a site, or reload a page. The button bar contains the Back, Forward, Menu, Bookmark, and Page actions. These bars can be toggled on or off using the Browser menu. Select Browser>Button Bar or Button Bar + Address Bar to toggle the button and address bars. When these bars are visible, the Reload, Back, and Forward icons are available. ![]() Visible address and button bars
Tip: Click the screen header to toggle the address bar on/off. Screen header
When the address and button bars are disabled, use the Reload, Back, and Forward actions on the Browser menu, or use the Back
2.3.2 Panning, Scrolling, & ZoomingThere are two methods for panning/scrolling a page that is larger than the screen. To use traditional Windows scrollbars, select Browser>Scroll Bars to toggle on/off horizontal and vertical scrollbars. ![]() Scrollbars enabled
To pan the view, press the CTRL key while moving the mouse in the direction you want to pan. Vertical and horizontal page position indicators appear on the screen. ![]() Pressing CTRL activates the panning control
Use the mouse wheel to vertically scroll the browser or web app. No page position indicators are shown during vertical scrolling. Zooming a page can be done with the zoom slider or by using the pinch-zoom method. To use a zoom slider, select Browser>Zoom, and use the slider to adjust the zoom amount. ![]() Zoom tool slider
To use pinch-zoom, press ALT to display two touch-finger pointers. Move the mouse to space the pointers. While holding the left mouse button down, move the finger pointers toward each other to zoom out. Move them away from each other to zoom in. ![]() Pinch zoom touch-finger pointers
2.3.3 Using BookmarksYou can bookmark websites using the Open Action icon
![]() Adding a bookmark
![]() Opening a bookmarked site
2.4 Sending a URL to a DeviceWhen using the Test Center device emulator to view a URL, you can easily send the URL to your device or to other recipients via email. The email is sent using the MobiOne AppCenter cloud service, by default. Note: See the Upload as AppCenter Website Tools setting to disable the AppCenter email service.
![]() Viewing a web page in the device emulator
![]() Sending a URL to an email recipient
2.5 Uploading a Mobile Web ApplicationTo test your application live, you can send the app to your device. MobiOne includes access to an AppCenter cloud service for testing designs on your device. Note: The Upload as Web Application function requires your device to be configured to receive notifications by either SMS text or email. If you are testing on a device that isn’t a phone, e.g., iTouch, it must be configured to receive email notifications.
![]() Upload as Mobile Web Application wizard - page 1
![]() Upload as Mobile Web Application - page 2
![]() Upload as Mobile Web Application - page 3
![]() Upload as Mobile Web Application - page 4
![]() Upload as Mobile Web Application - page 5
Note: The total size of your app files cannot exceed 20MB. If the total file size exceeds 20MB, use the Export to HTML feature in Design Center to save your design files to a folder you specify. You can then upload those files for testing to your own hosted website via any FTP or SCP upload tool.
2.6 Other Tools2.6.1 Toggling the Device FaceplateIf you prefer to see only the device screen without the faceplate, hide the faceplate by clicking the Show/Hide Faceplate icon ![]() Faceplate hidden
2.6.2 Capturing a Screen ImageYou can capture a screen image of what appears in the device emulator by clicking the Capture Image of Emulator icon ![]() Image preview
2.6.3 Viewing Source CodeViewing source code of other websites is a useful learning tool. With a web page open, select Tools>View Source from the menu. The Tools panel opens containing a list of source files you can view. If you view source files of a local design, you can make modifications using the source files list. Remote files cannot be edited. ![]() Viewing source files of a remote site
2.6.4 Strict WebClip ModeWhen you open a web application on your device using the Mobile Safari address bar, by default, the button bar displays. If you add the site to your home screen and run it using the app icon, the button bar does not appear. When you run a design from Design Center, by default the device emulator displays your design as if it were launched from an app icon on the Home screen, i.e. without the button bar. When you use the Upload as Web Application tool, a link to your web app is emailed to you. When you click the link, the app opens as if launched from the address bar, with the button bar visible. If you want to view your web app in the device emulator as it will appear when opened from a link, enable Strict WebClip Mode on the Browser menu.
3. Viewing and Editing Source CodeThe Tools panel contains the testing and development tools for further customizing your application. Most importantly, you can view source files and add custom JavaScript to your app. Click the Show Tool Panel icon ![]() Tools panel
The MobiOne Design Center generates a web application equivalent of your user interface screen layouts and page flows. The code generated is based on the HTML5 standards and consists of HTML, JavaScript (JS), and cascading style sheets (CSS3). MobiOne Design Center generates these files when you click the Run Design icon Note: MobiOne detects when you’ve made manual changes and prompts you to choose whether or not to overwrite the file(s) when you run the design. If you want to generate all files in your application, open the home page of your app in Design Center, and click the Run Design icon
3.1 Location of Generated FilesIf you select File>Export>Export as HTML from the Design Center menu, you choose the folder in which MobiOne generates the files. Clicking the Run Design icon ![]() Run Design button generates an export folder
When you use the Upload as Web Application tool, files are generated in a folder with the same name as your design file, appended with "-www".
3.2 Viewing and Modifying Source FilesWhen viewing your app in Test Center, select View>Show Tool Panel from the menu. From the Tools panel, select Tools, and then View Source. This displays a list of all generated files. When you click a file, it opens into the editor where you can make changes or additions to code. Notes:
![]() Tools panel displaying the source file list
3.2.1 Source File Reference
3.3 Editing JavaScriptOne of the files MobiOne generates is a custom JavaScript file where you can place your own JavaScript code. The file has the same name as your design file, appended with “_custom”. In the example above, you can see the file zipcode-details_custom.js in the source file list. The custom file is not overwritten when you update your design files. ![]() Default custom JavaScript file
The project_name_custom.js file includes example life-cycle event callback functions such as documentReady, prePageTransition, postPageTransition and postOrientationChange. You can add your own JavaScript code in the body of any of these functions that needs to be triggered by its corresponding event. The functions are invoked by the phoneui library. You can also include your own functions. When you save the file with your changes, the screen is automatically reloaded by the emulator to render your new code
4. Debugging and MonitoringThe Tools panel contains tools for debugging Javascript, viewing the DOM, profiling, and monitoring resources and local storage. 4.1 DOM InspectorThe DOM Inspector allows you to view the document object model. As you hover over an element in the inspector, the element is highlighted in the device emulator. To open the DOM Inspector, click the Show Tool Panel icon ![]() DOM Inspector
4.2 Resource MonitorUse the Resource Monitor to view how each of your resources affect your application performance. The monitor displays a graph allowing you to quickly see which resources take the most processing time or require the most space. To open the Resource Monitor, click the Show Tool Panel icon ![]() Resource monitor displaying load time graph
![]() Resource monitor displaying file size graph
4.3 ProfilerUse the Profiler to analyze your JavaScript functions for application optimization. Access the Profiler by clicking the Show Tool Panel icon To generate a profiler report, click the Start Profiler icon ![]() Profile report
4.4 DebuggerThere are two types of JavaScript programming errors that can be difficult to isolate and resolve. They are syntax errors and logic errors. MobiOne’s Test Center provides powerful runtime inspectors - a JavaScript debugger and a JavaScript console for executing JavaScript snippets. Syntax errors are easily isolated when you follow the guidance of this document and place your custom JavaScript code in the project’s project_name_custom.js file. To open the JavaScript debugger, click the Show Tool Panel icon ![]() JavaScript debugger file list
To set break points, click the line number beside the points at which you want to pause execution. Run through activities in your app that cause the break point to be hit. When execution pauses at the breakpoint, examine call stack and variable details on the right. ![]() Debugging the _custom.js file
To continue running the script after hitting a breakpoint, use the toolbar icons Logic errors are typically easier to detect by using breakpoints and stepping through the execution of a function or program. Open the JavaScript console by clicking the Show/Hide Console icon ![]() JavaScript console
4.5 Local Storage InspectorA quick and easy way to persist user data for your web application is to use the HTML5 Local Storage mechanism. Local storage is a simple key-value dictionary storage for up to 5MB of user data. The JavaScript API is simple to learn and use: localStorage.getItem(key) The Local Storage Inspector allows you to view data stored in local storage. Access the Local Storage Inspector by clicking the Show Tool Panel icon In the following example, a user can enter a key name and a value, and then store it to local storage. The JavaScript used to interact with local storage is shown in the image below. ![]() Simple application that saves user input to local storage
After data is entered and saved using the emulator, you can use the Local Storage Inspector to view the data. You can also edit data from the inspector. ![]() Inspecting and editing local storage data
5. Test Center SettingsTest Center settings allow you to manage and customize Test Center preferences. 5.1 Network & UpdatesProxy settings in MobiOne share the Windows Internet Explorer network settings. When you select the Proxy setting, the IE Internet Properties window opens. ![]() Setting Windows Internet properties
The Software Updates setting allows you to set your preferences for how you want to receive updates to MobiOne Studio. ![]() Software update settings
The Local Web Server setting allows you to test forms and resource requests to remote servers from Test Center. Note: Enabling the Local Web Server provides users of this computer and computers on the same network access to the mobile web content created when you export Design Center .mobi files to HTML or when you run the app from Design Center. While MobiOne employs a "hard to guess" semi-cryptic URL generation strategy for all resources, be aware that the content of ![]() Local web server settings
5.2 BrowserThe Home Page settings allows you to set the default page that opens when you open the browser in the device emulator. ![]() Home page setting
The Cache settings allow you to clear various caches. Select either all caches, or select specific caches to clear. ![]() Cache settings
The device emulator implements the HTML5 geolocation API. The gelocation implementation uses a static location defined in the Geolocation setting. You can enter your geolocation for running apps in the device emulator that provide information based on your geolocation. The location value is a longitude, latitude coordinate. The default value provided with MobiOne is the location of Genuitec's north Dallas, Texas office. You can change this coordinate to any value you choose. ![]() Geolocation setting
5.3 Home ScreenThe Wallpaper setting allows you to customize the background image of the device emulator Home screen. MobiOne provides a gallery of free wallpapers that you can download for the iPhone device emulator. ![]() Wallpaper setting
The Shortcuts setting allows you to change the name of the Browser shortcut, or reset the Home screen to the default. ![]() Shortcuts setting
5.4 ToolsThe Editor setting allows you to enable a dark editor background. ![]() Enabling the dark editor theme
The Screen Capture setting allows you to capture the device emulator screen without the faceplate. The resulting image is similar to what you get if you capture the screen on your actual device.
Disabled faceplate and the resulting screen capture
The Upload as AppCenter Website setting allows you to enable email notification via the AppCenter email service when the upload is complete. If you disable this setting, your email client opens a new email containing a link to your web application. Enter the default email address that appears on the notification page of the wizard. The Shorten Application URLs setting redirects to a shorter, more manageable URL. ![]() Upload as AppCenter Website setting
6. Where Do I Learn More about MobiOne Studio?The MobiOne online Learning Center site provides documents, tips, tutorials and videos to help answer your questions. Remember to check the Learning Center site for new and updated material. ©Copyright 2012 Genuitec, LLC. All Rights Reserved.
|
















































