Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Test - Central Registry "Search and Admit" Workflow #328

Merged
merged 17 commits into from
Apr 27, 2024

Conversation

Jtang-1
Copy link
Collaborator

@Jtang-1 Jtang-1 commented Apr 26, 2024

Output in relation to this doc.
Jira Ticket

This PR creates a load test script that captures the below workflow on the Central Registry app:

Step Notes
Open Search and Admit module This is a search first module so no data is loaded
Enter first name, last name, dob, medicaid id, reason for no ssn, consent to searchThe search should be for a client that is not admitted (when looking at data, search for current_status =  
Search If one of more results is found, they will be automatically selected and the appropriate form will launch
Abandon the workflow (i.e. don’t submit the form, we only care about how long it takes to open)  

Base automatically changed from sk/refactor-bed-tracker to master April 26, 2024 07:16
Copy link
Contributor

@snopoke snopoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see these looking simple and more concise

def _(parser):
parser.add_argument("--domain", help="CommCare domain", required=True, env_var="COMMCARE_DOMAIN")
parser.add_argument("--app-id", help="CommCare app id", required=True, env_var="COMMCARE_APP_ID")
parser.add_argument("--app-config", help="Configuration of CommCare app", required=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering about this yesterday - if this config doesn't change then we might as well just have it as a constant in python

Copy link
Collaborator Author

@Jtang-1 Jtang-1 Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was about to agree, but Woody brought up a scenario today where the app config would change. He wants to run the same script on a slightly different variation of the same app where the case search title is different. This can reuse everything with a slightly different app-config file. He was referring to a different app, but the same potential scenario is applicable here


@events.init_command_line_parser.add_listener
def _(parser):
parser.add_argument("--domain", help="CommCare domain", required=True, env_var="COMMCARE_DOMAIN")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I suggested making these command line args originally but having worked on the bed tracker one I see how specific these are to the app and domain and that having to provide all the config via the command line is a bit painful.

for the bed tracker I reverted to using a yaml config file (which was the original approach).

I'm not suggesting you change this now, just making a note.

logging.error("Error loading cases to select: %s", e)
raise InterruptTaskSet from e

class LoginCommCareHQWithUniqueUsers(HttpUser):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering that the users are basically exactly the same for the different tests I wonder if we shouldn't create a base class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, a1ecf7c

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it intentional to add this file? it's got a strange name prefix (~$)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, was accidental. It was a temporary file excel makes when i have it open e40ac8b

@Jtang-1 Jtang-1 merged commit bec54fb into master Apr 27, 2024
3 of 8 checks passed
@Jtang-1 Jtang-1 deleted the jt/central-registry-load-test-script branch April 27, 2024 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants