Test cases

Integration tests are implemented to test the accuracy of the functionality offered by the component as well as to verify the data communication between different APIs and components.

Provided below are the test cases that include input given to the system and its corresponding resultant outcome for each action with the series of steps for how to achieve this.

Create calendar event test

Functionality

Create a new calendar event with supplied details.

Input fields with checks

  • Context Code is a non-empty string (example: course_2).

  • Title is a non-empty string (example: Integrations test).

  • Start Date is a non-empty DateTime (example: 2023-01-20T21:00:00Z).

  • End Date is a non-empty DateTime (example: 2024-01-20T22:00:00Z).

  • Description is a non-empty string (example: Event to test Integrations).

  • Location is a non-empty string (example: Brisbane).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Create calendar event in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API create a calendar event.

  7. To verify the request was successful, confirm that the Description field matches the description provided in Mapping. Additionally, verify that other relevant fields such as created_at reflect the date and time the request was made.

Delete calendar event test

Functionality

Delete the calendar event with the specified ID.

Input fields with checks

  • ID is a non-empty integer (example: 007).

  • Cancel reason is a non-empty integer (example: Integrations test).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Delete Calendar Event in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

    You might need to create a calendar event first (using the Create calendar event action) and use the ID of this newly created event to make a delete Calendar Event request.
  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API delete the specified calendar event.

  7. To verify the request was successful, confirm that the ID field matches the ID provided in Mapping. Additionally, verify that other relevant fields, such as workflow_state, have the deleted value.

Get announcements test

Functionality

Retrieve the paginated list of announcements for the given courses and date range.

A context_code field is added to the responses so you can see to which course each announcement belongs.

Input fields with checks

  • Start Date is an optional Date (yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ).

  • End Date is an optional Date (yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ).

  • Context Code is a non-empty string (example: course_2).

  • Active Only is an optional boolean.

  • Include is an optional array.

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get announcements in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the list of announcements.

  7. To verify the request was successful, confirm that each context_codes field matches the context codes provided in Mapping.

Get assignment test

Functionality

Retrieve the assignment with the provided ID for the specified course.

Input fields with checks

  • Course ID is a non-empty integer (example: 2).

  • Assignment ID is a non-empty integer (example: 2).

  • Include is an optional string.

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get assignment in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the details of the specified assignment.

  7. To verify the request was successful, confirm that the ID field matches the assignment ID provided in Mapping.

Get assignments for course test

Functionality

Retrieves the paginated list of all assignments for the specified course.

Input fields with checks

  • Course ID is a non-empty integer (example: 2).

  • Results Per Page is an optional integer (example: 50).

  • Page Number is an optional integer.

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get assignment for course in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the details of all the assignments.

  7. To verify the request was successful, confirm that for each element of the data array, the course_id field matches the course ID provided in Mapping.

Get calendar event by ID test

Functionality

Retrieve the single calendar event with the provided ID.

Input fields with checks

  • ID is a non-empty integer (example: 60).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get calendar event by ID in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the single calendar event.

  7. To verify the request was successful, confirm that the ID field matches the ID provided in Mapping.

Get calendar events test

Functionality

Retrieve a paginated list of calendar events for the current user.

Input fields with checks

  • Start Date is a non-empty Date ( yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ).

  • End Date is a non-empty Date ( yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ).

  • Context Codes is an optional string (example: user_39).

  • Results Per Page is an optional integer (example: 10).

  • Page Number is an optional integer (example: 5).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get calendar events in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrive the calendar events for the current user.

  7. To verify the request was successful, confirm that the start_date and end_date fields match the start date and end date provided in Mapping. Additionally, other fields in the API response such as context_codes could also be verified against supplied field context codes in Mapping section (if applicable).

Get course test

Functionality

Retrieve the course with the provided ID.

Input fields with checks

  • Course ID is a non-empty integer (example: 2).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get course in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrive the details of the specified course.

  7. To verify the request was successful, confirm that the ID field matches the course ID provided in Mapping.

Get courses test

Functionality

Retrieve the paginated list of all courses for the selected account.

Input fields with checks

  • Account ID is an optional integer (example: course_2).

  • State is an optional string (example: Queensland).

  • Results Per Page is an optional integer (example: 50).

  • Page Number is an optional integer (example: 5).

  • Additional Parameters is an optional set of strings.

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get courses in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrive all the course details for the selected account.

  7. To verify if the request was successful compare any of the optional input values specified with the data fields in the response from the API. If no input values were specified, then confirm the response has valid fields such as ID, created_at, name, and so on.

Get discussion topic by id test

Functionality

Retrieve the specified discussion topic.

Input fields with checks

  • Owning Entity Type is a non-empty string (example: courses).

  • Owning Entity ID is a non-empty integer (example: 381).

  • Topic ID is a non-empty integer (example: 224).

  • Include is an optional string.

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get discussion topic by ID in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the specified discussion topic.

  7. To verify the request was successful, confirm that ID field matches the topic ID provided in Mapping.

Get discussion topics test

Functionality

Retrieve the discussion topics for the specified owning entity.

Input fields with checks

  • Owning Entity Type is a non-empty string (example: courses).

  • Owning Entity ID is a non-empty integer (example: 381).

  • Include is an optional string.

  • Order By is an optional string.

  • Scope is an optional string.

  • Only Announcements is an optional boolean.

  • Filter By is an optional string.

  • Search Term is an optional string.

  • Exclude Context Module Locked Topics is an optional boolean.

  • Results Per Page is an optional integer (example: 50).

  • Page Number is an optional integer (example: 5).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get Discussion Topics in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the discussion topics for the specified owning entity.

  7. To verify the request was successful, confirm that html_url and/or url fields contain the value provided in the Owning entity type field under the Mapping section. Additionally, verify that the response is a valid data array returned with valid metadata values such as ID, title, created_at, and so on.

Get file test

Functionality

Retrieve the file with the provided ID for the specified course.

Input fields with checks

  • Course ID is a non-empty integer (example: 381).

  • File ID is a non-empty integer (example: 500).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get File in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the details of the specified file.

  7. To verify the request was successful, confirm that the ID field matches the file ID provided in Mapping.

Get files for course test

Functionality

Retrieve the paginated list of all files for the specified course.

Input fields with checks

  • Course ID is a non-empty integer (example: 381).

  • Results Per Page is an optional integer (example: 50).

  • Page Number is an optional integer (example: 5).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get files for course in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve all the files.

  7. To verify the request was successful, confirm that the response is a valid data array with valid metadata values such as ID, created_at, and so on.

Get section by ID test

Functionality

Retrieve the specified section.

Input fields with checks

  • Section ID is a non-empty integer (example: 2).

  • Course ID is an optional integer (example: 2).

  • Include is an optional string.

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get section by ID in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the specified section.

  7. To verify the request was successful, confirm that the ID field matches the section ID provided in Mapping. Additionally, verify that other relevant fields, such as course_id, match the supplied value under Mapping.

Get user test

Functionality

Retrieve the details of the specified user.

Input fields with checks

  • User ID is an optional integer (example: 197).

  • SIS USER ID is an optional integer (example: 10001234).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get user test in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the details of specified user.

  7. To verify if the request was successful, if only a user ID was provided by the user, confirm if the ID field in the response matches the user ID provided in Mapping. Otherwise, if only SIS User ID was supplied in Mapping, then verify that it matches the sis_user_id field in the response, or else verify both fields.

Get user enrollments test

Functionality

Retrieve a paginated list of all of the specified user’s enrollments.

Input fields with checks

  • User ID is an optional integer (example: 197).

  • SIS USER ID is an optional integer (example: 10001234).

  • State is an optional string.

  • Results Per Page is an optional integer (example: 50).

  • Page Number is an optional integer (example: 5).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Get user enrollments in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve the details of user enrollments.

  7. To verify if the request was successful, if a user ID was provided by the user, confirm if the user_id field in the response matches the ID provided by the user in Mapping. Additionally, check that any value supplied as input under the Mapping section matches the corresponding data field in the response.

Search all users test

Functionality

Retrieve a paginated list of all of the users matching the specified criteria.

Input fields with checks

  • Account ID is an optional integer (example: 007).

  • Search Term is an optional string (example: Integrations test).

  • Enrollment Type is an optional string.

  • Sort By is an optional string.

  • Order is an optional string.

  • Results Per Page is an optional integer.

  • Page Number is an optional integer.

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Search all users in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

Please Note: You might need to create a calendar event first (using the Create calendar event function) and use the ID of this newly created event to make a delete calendar event request. . In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API retrieve all the users matching the specified criteria.

  1. To verify the request was successful, confirm that the response is a valid data array where each array element possesses valid fields such as ID, name, created_at, login_id, and so on.

Update calendar event test

Functionality

Update and return the calendar event with the provided details.

Input fields with checks

  • ID is a non-empty integer (example: 409).

  • Title is a non-empty string (example: Integrations Test).

  • Start Date is a non-empty DateTime (example: 2023-01-20T21:00:00Z).

  • End Date is a non-empty DateTime (example: 2024-01-20T22:00:00Z).

  • Description is a non-empty string (example: Event to test Integrations).

  • Location Name is a non-empty string (example: Brisbane).

Manually testing the action

Assuming the flow is configured with a trigger connected to the Canvas component, follow the steps below to test the action:

  1. Select the latest version of the component.

  2. Select the desired function, Update calendar event in this case.

  3. If you have not already done so, create valid credentials to communicate with the Canvas API. Read the Credentials section for more information.

  4. Set up the configuration to suit your requirements.

  5. Complete the Mapping configuration by providing the input fields discussed in the Input fields with checks section.

  6. In the next step, under the Sample section, click on Retrieve new sample from (DEV) Canvas LMS to request the API update and return the calendar event.

  7. To verify the request was successful, confirm if the ID and title fields match the ID and title, respectively, provided in Mapping.