How-To Guides
This guide provides instructions for performing common tasks in Tangram Pro Verifier. Please use the sidebar to navigate to the topics you're looking for.
Prepare Your Component for Verifier
See What You'll Need in the Verifier reference guide.
To use Verifier, you'll need to create or edit a component in a Tangram Pro project while in Design mode.
- Configure the messages that your component will need to send and receive
- To use a new set of messages, you'll need to create a new Flex package
- Set up the transport that messages will travel over
- You may want to modify the transport's settings if you're planning on using Verifier in CI
Create Message Sequences
- Open a project and go to Verify
- Select a component and click the Component Sequences tab
- Click Add Sequence
- Click Add Initial Sequence Message and choose the first message that you want to either be input to your component-under-test or output by it
Add Messages to a Sequence
- Click the
+ Add Initial Message
on an empty sequence, or hover over the dot menu to the left of any existing message in a sequence - Choose Add Message Before or Add Message After
Create an Alternate Message Path
- Click on the dot to the left of the message that you want to define an alternate for
- Choose Add Alternate Message
- You can then add messages to each separate path as needed
Duplicate Sequences
You can create a copy of a sequence, including its constraints, by clicking the Duplicate icon on the top right of a sequence.
Create and Use Message Templates
- Click the Message Templates button in the top right of the
Component Sequences
panel, next to the+ Add Sequence
button - Create a new template, then select the package and message or struct which will have its fields templated
- Type in the constraints YAML you'd like to template and save
This template can now be applied directly to any message using the menu located at the bottom left of the Constraints
panel,
or using the anyOf
constraint.
Run Verifier Tests
When you start a test, Tangram Pro will iterate through all message sequences the component should be able to handle, analyzing whether or not the component behaves as expected. Tangram Pro will listen when the component should be sending a message, and will generate a message per the sequence criteria when the component expects to receive a message from the system.
Setup A New Test
Each time you start a test you have the option of changing the setup. Your previous setup is remembered so you don't have to set it everytime.
To start a test
- Click the Setup New Test button
- Specify the container image that contains your component software
- Choose Use Project Build to use an image generated by a Tangram Pro build
- Choose Use Container Registry to use an image in a registry
- Select a registry you've authorized
- Type in the path to the image
- Enter Test Runs Total: The number of times you want to test your sequences (e.g. 2 means your sequences will be tested twice)
- Enter Max Path Retries: The number of retries to attempt if a sequence is unsatisfied (e.g. 5 means a sequence path will be attempted up to 5 times until it is satisfied. If it is satisified on the 2nd attempt it will not retry again.)
- Enter Message Timeout: The time in milliseconds to wait for the next expected message in the sequence
- Choose sequences to Skip by disabling them
- Click Begin Verifier Test
Tangram Pro will run the component in isolation, with the test environment emulating the rest of the system, to test the component's interface and see how the it reacts to its environment.
Rerun Test
You can rerun any completed test with the click of a button. This will execute the test again with the same setup and input parameters.
- Go to View Tests
- Open a completed test
- Click the Run Test Again button in the top right
Add Field Constraints to a Message
- Locate a message in a sequence and click the Constraints link beside it
- Type in constraints YAML, apply a message template, or both!
If you do both, apply a message template and type in constraints, the typed-in constraints will override any constraints from the template if the field names match.
View Tests
When a test is running, Tangram Pro provides live reporting as it processes and analyzes each sequence, including the contents of the messages being sent. When complete, the test summary is saved for you to view all of those details later.
Interpreting Results
Tangram Pro reports a sequence as "Satisfied" if both of these conditions are met:
- The messages were sent and received in the order specified by sequences
- The message contents met all specified constraints
A sequence will be "Unsatisfied" if either of the above conditions are not met. It is important to note, a sequence may be "Unsatisfied" if the wait time between subsequent messages exceeds the "Message Timeout" and if the number of retries reaches the "Max Path Retries".
Tangram Pro also provides two real-time log streams.
- Component Logs: These are the logs output by your software component
- Debug Logs: These are the logs output by Tangram Pro's test environment
In the event that a test results in "Error", the logs may be helpful in determining the cause.
Viewing Prior Tests
- Go to View Tests
- Click on a test to view its results in more detail
Export Test Results
Completed test results can be exported in either PDF, DOCX, or JSON format.
- Go to View Tests and open a completed test
- Click the Export Results button on the top right
- Wait for the process to complete (this may take a few seconds)
- Then click the Download Results button and choose the desired format