Test surveys

These steps verify the survey is working as expected and your application is communicating with the Sense360 back-end correctly.

Requirements

  • You have tested your integration as described in Test the integration.

  • You have set a Third-party user ID and passed it to the Sense360 Android SDK.

  • Application ID. This corresponds to the applicationId element in your build.gradle and it is used to activate inserting a test survey.

  1. Insert a test survey.
    Restriction: You can insert up to 10 surveys per application per day.
  2. Add this call to Sense360Testing.triggerSurveyNotification() after starting the SDK:
    Sense360.start(getApplicationContext(), BuildConfig.DEBUG);
    // Specify the Third-party User ID for your application
    Sense360.passThirdPartyUserId(getApplicationContext(), "thirdPartyUserId");
    // Insert a test survey
    // On success, trigger a test survey notification
    try {    
        Sense360Testing.insertTestSurvey(this, new Callback() {      
          @Override 
          public void onFailure(@NonNull Call call, @NonNull IOException e) {  
            e.printStackTrace();
          }                        
          @Override       
          public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {            
            Sense360Testing.triggerSurveyNotification(getApplicationContext());      
            }    
          });
    } catch (Exception e) {  
      e.printStackTrace();
    }
  3. Build and run the application.
  4. Navigate in the application to locate the trigger call to Sense360.start().
    This toast notification appears: Survey notification should be shown soon. If the notification does not appear in one minute, contact Medallia Support to review your application setup.
  5. Click the notification to access the sample survey.
  6. Remove testing code.
    Make sure to remove calls to Sense360Testing.insertTestSurvey and Sense360Testing.triggerSurveyNotification to stop getting notifications.
You have tested your survey and verified your data.