Test Cases
Summary
Test Cases allow administrators to easily test their Profile configuration. This is to allow testing the Profile more easily and quickly as this method does not need a Incoming Mail handler to be configured.
Creating a Test Case
Manual Creation
Navigate to the Test Cases tab, and select Create
A Test Case creation page will appear where you can specify a MIME formatted email.
Select the profile that the email will be processed against. Ensure that the relevant Catch Email Address has been added to one of the recipients headers (To,Cc).
Press Create to complete the Test Case creation process.
Once created the Test Case will be shown within the List within Test Cases. Here there are a number of Actions that can be performed for each Test Case.
Creation from previously processed email
For information about enabling JEMH auditing see: https://thepluginpeople.atlassian.net/wiki/spaces/JEMH/pages/3806167079
If enabled JEMH will retain recent incoming emails, allowing you to review if they are creating/commenting on issues correctly. These can also be used to create a Test Case when there are processing issues. This is done within Auditing > Incoming Mail (when auditing is enabled) once here there is a Create test case action for each Audit record.
When pressed it will show a information popup with a link to take you to the Test Cases page.
Here you will see the new Test Case with a Description stating it was imported from Audit History.
Importing a Test Case
Importing a Test Case allows to create a Test Case from a real email that has already been received. This is particularly useful when testing why a particular email did not get processed correctly. Note: only txt and eml file formats are supported.
Navigate to the Test Cases tab, and select Import
A form will be shown where you upload the file and specify the Profile for this particular Test Case.
Once imported you will then see the new Test Case within the list.
Editing a Test Case
To edit the Test Case you press the Edit action and this will then open the Test Case editor.
Here there will be some configuration options which will allow you to modify the Test Case.
Editor options
Profile
This is the Profile that is used to process this Email.
Description
A brief description of the Test Case.
Content
This is the Email content. This includes email headers and email body content.
Update
This will save the Test Case with it’s new changes.
Update and run
Saves the Test Case with the new changes and will then process the Test Case with the selected Profile.
Cancel
This removes all of the changes made and will take the user back to the list of Test Cases.
Editor Actions
This is a range of functions that will encode and decode the selected email content. Current Options are:
Base64 Decode Selection - This decodes the selected Base64 section allowing the encoded content to be viewed.
Base64 Encode Selection - This encodes the selected content using Base64. Typically used when you have previous Decoded a Base64 section.
Quoted Printable Decode Selection - Decodes the selected Quoted Printable section.
Quoted Printable Encode Selection - Encoded the selected content using Quoted Printable. Typically used when you have previously Decoded a Quoted Printable section.
For more info about Base64 see: Content-Transfer-Encoding: base64
For more info about Quoted Printable see: Content-Transfer-Encoding: quoted-printable
Running a Test Case
In order for a test case to be processed, you must first have selected an existing Profile for it to be processed with. Profiles can be duplicated by copying them, so one can be setup for testing purposes if you wish.
The Test Case can be run against the related profile by selecting the Run action for the Test Case:
After executing a Test Case, you will be shown a report screen that provides information on the results of the email processing.
Test Case Actions
Run
This will process the Test Case with the Profile selected within the Test Case editor.
Edit
This opens the Test Case Editor. Here you can modify the Test Case headers, Profile used to process and the description of the Test Case.
Copy
This will create an exact copy of the Test Case. The copied Test Case will have a prefix of “Copy of” within the description.
Configure Profile
When pressed it will take you to the selected Profile’s Summary.
Export
This downloads an export of the Test Case email using a text (.txt) file format. The name will use the following format: “jemh-testcase-Id” Id is Test Case Id.
Delete
This removes the Test Case.