Skip to content

Added the Appointments Scenario #82

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Lemeri123
Copy link

This implementation covers the steps and API calls involved in the AppointmentBookingScenario

@Lemeri123
Copy link
Author

@jayasanka-sack @Bawanthathilan Please review this and let me know if its all well

Comment on lines +21 to +36
.exec(http("User Login")
.post("/ws/rest/v1/session")
.header("Authorization", AUTHORIZATION)
.body(StringBody("{\"username\": \"" + USERNAME + "\", \"password\": \"" + PASSWORD + "\"}"))
.check(status().is(200))
.check(jsonPath("$.sessionId").saveAs("sessionId"))
)
.exec(session -> {
String sessionId = session.getString("sessionId");
return session.set("authToken", "Bearer " + sessionId);
})
.exec(http("Go to Home Page")
.get("/spa/home")
.header("Authorization", "#{authToken}")
.check(status().is(200))
)
Copy link
Member

Choose a reason for hiding this comment

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

We don’t specify API calls here. Instead, we use registry methods and HTTP methods defined separately. Take a look at how other scenarios are implemented.

https://github.com/openmrs/openmrs-contrib-performance-test/blob/main/src/test/java/org/openmrs/performance/scenarios/VisitPatientScenario.java

Copy link
Author

Choose a reason for hiding this comment

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

Just to clarify, should I create a new registry to handle the Appointment Booking scenario, or should I integrate it into the existing registry? I want to ensure I align with the current implementation approach.

Copy link
Member

Choose a reason for hiding this comment

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

Since this is related to the clerk persona, we can use clerk registry and the clerk http service

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.

2 participants