Testing with Google Cloud - Display-Lab/scaffold GitHub Wiki
Testing with Google Cloud
Verify Access
The first step to testing in the cloud is making sure you have access to the platform. Try to open up the following links after signing into your Level 1 umich account in your browser:
If the request fails and you do not have access, reach out to Display lab administrator and request them to add you to [email protected] Mcommunity group.
Postman Auth Setup
To send post requests for the pipeline to process, we use a program called Postman. You can use either the Postman program found here, or create an account and use the browser version here.
- Once postman is installed and you have a Google Cloud collection set up, open google chrome and install the postman interceptor plugin
- Open the postman desktop app, at the bottom there is a satellite icon called capture requests. Click it.
- Go to
via interceptor
and enable capture requests, alternatively you can capture request from the google chrome postman plugin. - Again at the bottom of the postman desktop app you should see a cookie icon. Click on the icon and select the sync cookies option. Add "google.com" and
https://pfp.test.app.med.umich.edu/
https://pfp.lab.app.med.umich.edu/
https://pfp.app.med.umich.edu/
to the domains whitelist, and click sync cookies.
-
In Postman, open a new post request. Make sure you are sending a
GET
request to one of the URLs listed above, and check to see that the request succeeds. -
Make a new post request template for Google Cloud testing (see here). For the cloud API, we send our
POST
requests to the following URLs:
https://pfp.test.app.med.umich.edu/createprecisionfeedback
https://pfp.lab.app.med.umich.edu/createprecisionfeedback
https://pfp.app.med.umich.edu/createprecisionfeedback
- Save your template, duplicate it, and modify the body data for testing whatever data sets you choose.
Debugging
There is an option in the current main.py
that looks for a defined "debug" value in the postman request. As of 7/18/23, this means you need to go into the postman request and define a variable as debug, and set a value to "yes" or "no".