Alias Mechanism
Test coverage:
This test will confirm your Alias mechanism is working as expected. The test will be divided into 2 tests:
- Basic test which is monitoring the API call when an alias is created.
- Advanced test using a segment creation.
Note: you will need to integrate the Alias mechanism into your app in order for you to use it.
Basic Test procedure:
Note: The majority of Alias mechanism implementation is using the application login process to initiate the 'set Alias' API call. If as a part of your SDK integration you are assigning an Alias automatically when the application is installed,
please make sure to follow the set Alias API call when you are launching your app for the first time.
- Make sure Charles ,or a sniffer tool of your choice, is configured and running on your computer.
- Open your application.
- If this is the first time you are logging into the application please proceed with entering the requested information.
- If you are already logged into the application please logout and log back in with a new username (Since the alias is saved in the application cache, logging out of the application and logging right back into the app will not initiate the API call)
Expected results:
The following requests and their respective responses should be successfully reported by Charles.
Each request should return a response code of 200 indicating the call was successful.
Advanced Test procedure:
- Retrieve the Device Alias from the API call you monitored in the Basic test.
- Create a Segment based on Alias, you can use the steps from the Use the 'Test Group' Feature with Alias procedure, make sure to use your test device alias.
- Create a push notification in your account and send it to your test device using the segment you've created in the last step.
Expected results:
- Verify that Opt-In Users is updated to 1.
- Your Device should receive the Push notification you have sent.
Logs
IOS
Setting new Alias
[Appoxee Debug] Starting Alias update operation... [Appoxee Debug] Starting Alias fetch operation... [Appoxee Debug] Alias fetch operation completed. [Appoxee Debug] Alias update operation in progress... value is being updateded with Appoxee Servers. [Appoxee Debug] Alias update operation completed.
Setting the same Alias
[Appoxee Debug] Starting Alias update operation... [Appoxee Debug] Starting Alias fetch operation... [Appoxee Debug] Alias fetch operation completed. [Appoxee Debug] Alias value did not change, aborting update.
Android (logcat)
Setting new Alias
D/Appoxee SDK﹕ updateDeviceFields_SQS Params: {"set":{"alias":"testalias"}}
Setting the same Alias
I/Appoxee SDK﹕ setDeviceAlias() Called D/Appoxee SDK﹕ setDeviceAlias Success