About Testlum
Getting Started
General Features
UI Testing
Api Testing
Database Testing
Additional Materials
Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
SendGrid
Copy Markdown
Open in ChatGPT
Open in Claude
How to send the query
Description
<sendgrid> - command which is responsible for sending the SendGrid queries in testing scenarios
Required parameters for SendGrid command:
- comment
- alias - unique name of the API you configured in your
integration.xmlfile
Optional parameters:
- condition - the condition according to which this test step will or won't be executed
- threshold - parameter, that sets the maximum allowed test step execution time
Available SendGrid methods:
- GET - this method retrieves email statistics from SendGrid’s API.
- POST - this method sends an email using SendGrid’s API.
- PUT - this method updates an existing contact on SendGrid’s contact list.
- DELETE - this method deletes an email template from SendGrid.
- PATCH - this method updates an existing email template on SendGrid.
Required parameters for HTTP methods:
endpoint - endpoint for your query
response
- code - expected response code
- file - file with the expected result for a particular query
- header
- name - name of header
- data - data which header has to contain
- header
header
- name - name of header
- data - data which header has to contain
body (for those methods, which require body)
from
- file - json file that contains body of your request. This file must be named "request_N.json", where N is number of your test step
param
- name - name of parameter
- data - data which parameter has to contain
multipart
- file
- name - key
- fileName - value
- contentType
- file
raw - you can put your request body just as raw in scenario without file
queryParam
- key
- value
SendGrid example:
XML
x
<sendgrid comment="Testing post method" alias="ALIAS"> <post endpoint="/templates"> <response code="201" file="expected_1.json"/> <body> <raw> { "name": "example_name", "generation": "legacy" } </raw> </body> </post></sendgrid><var comment="Create variable for templates id token" name="template_id"> <path value="$.id"/></var><sendgrid comment="Testing get method" alias="ALIAS"> <get endpoint="/templates/{{template_id}}"> <response code="200" file="expected_3.json"/> <header name="Content-Type" data="application/json"/> </get></sendgrid>Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Next to read:
SMTPCopyright © Knubisoft
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message