This is a document that specifies the steps that need to be taken before running Soasta tests on Insights.
The setup for running Soasta tests on Insights app mainly consists of 3 steps
- Installing Insights app on iPad
- Creating app in an
- Seeding data
- User needs to be logged in dashboard in a particular org in which the app exists
- Insights privileges:
- In-order to see a selected app data in Insights app, the logged in user should have Insights privileges in the above organization
- the selected app needs to be packaged app so that it is sending analytics data with deployment type = production
Installing Insights app on iPad Air
Required manual setup on the app before running the composition
|1. In the Insights app, click on "Appcelerator Logo" on the top right corner|
|2. The above action should open the menu seen in the screenshot, click on "Debug"|
|3. Switch the environment to preproduction|
|4. Login in the lower right corner of the menu|
|5. Wait for the app to get updated with the required applications info, once done|
|6. Click on "Appcelerator Demo App" on the top left corner to see Apps list|
7. Search for the desired app (this app will be the one that you will be creating in the following sections and seeding data in) in the search field and select the app
Note: This step should be done after the app is created and data has been seeded. Also after the data has been seeded, wait for 15 minutes in-order for active sessions to settle down before running this test.
|8. After app is selected, you should see this screen from the screenshot Note: This is the expected launch screen of the app in order for the composition to run. Please make sure that you are seeing the orbs.|
|9. Launch the touchtest agent on the device|
|10. Play the imported composition, the attachment can be found at the bottom of the page|
Note: The Insights app asks for login every other time the user launches it. After you login and leave it at the expected launch screen, Soasta will be able to launch the app without the login once. If you need to open Insights multiple times, you will have to login before Soasta launches it.
Creating a New app and publishing it:
Note: We will be creating a new app, publish it and seed data in it every day we are running this test in-order to keep the data consistent. The data seeded should be good for a single day to run this composition.
- Create an app in the preproduction environment using Appcelerator Studio by selecting an org other than "qe_test_org_preprod"
- Publish it (package it) FYI: Only published apps show up in Insights app
- We will be using this app to seed data in the following section
- Download "post-event.js" and "get-metrics.js" from https://github.com/appcelerator/360_qe/tree/master/DashboardPemIntegration/test/automation-cli
- After the files are downloaded, open the terminal and cd to the location of the downloaded file
- npm install <module-name> to install any node modules if you don't have them installed
- Replace the app guid from the app created in "Creating a New app and publishing it" section in the following commands in all the places where you see guid. Run it in the terminal to seed data in to the app
Note: The values in the following commands are hard coded. So, please do not change them since the composition depends on these values.
|Generating Events||Command to seed data|
|Generating Installs and Avg Session length|
node post-event.js --event install-full --environment pre-production --deploytype production --guid <app guid> --platform android --amount 5 && node post-event.js --event install-full --environment pre-production --deploytype production --guid <app guid> --platform iphone --amount 6
|Generating Crashs and Unique Crashes|
node post-event.js --event apm-crash --environment pre-production --deploytype production --guid <app guid> --platform iphone --amount 5 && node post-event.js --event apm-unique --environment pre-production --deploytype production --guid <app guid> --platform iphone --amount 5
|Generating Retention Rate for Last week|
node post-event.js --event install-full --environment pre-production --deploytype production --guid <app guid> --platform android --amount 2 --timestamp <last week>
Note: to generate time stamp for last week, open the browser console and enter Date.now() - (1000 * 60 * 60 * 24 * 7)
|Generating Retention Rate for Current time|
node post-event.js --event install-full --environment pre-production --deploytype production --guid <app guid> --platform android --amount 2 --timestamp <current time>
Note: to generate time stamp for current time, open the browser console and enter Date.now()
Clip & Composition Details:
Import the above attachment in to the "Compositions" tab in "Test" tab.