Memos provide a way to remember data for use multiple times within a test case. The essentially act as calculated variables that may be re-used anywhere within a test case. Please also see the following guide for using environment variables in Test Panel: Test Panel - Environment Variables
When a fixture or assertion is invoked it goes through the following lifecycle:
- Load Memos data structure from Web API by calling:
POST /suite/action/setmemos { TestId: <guid>, SuiteId: <guid> }
This will inialize the Test and Suite memo sections - Call Init method on the provider to execute the fixture or assertion
- Call SetMemos on the provider to generate any new memo values as well as any Local memos that may be needed
- Execute the fixture or assertion
- Call ResultMemos if supported by the action type
- Save the result by posting the current memo state to /suite/action/setmemos
When using Memos, do not run more than one test, or one test suite at a time, as this will cause issues with the Memos.
Test Case memos are serialized and shared across servers. Memos may have the following scopes:
- Local – Active only for the current action, or current iteration of a load fixture/assertion. Primarily useful when the same calculated value must be accessed multiple times in a given fixture or assertion.
- Test – Persists until the current test cases finishes executing
- Suite – Persists until the current suite of cases finishes executing. This ONLY includes cases that are queued up at the same time.
Memos follow the same value rules as regular fixture fields in that they may be defined as a simple literal value, or may use templating to access the rule engine. A common mistake in configuring memos is to omit the square braces required by a templated value.
Using Memos
Memos are accessed with the Memo("name") function. If the same memo is defined in multiple scopes the more specific scope will be returned (Local -> Test -> Suite).
Comments
0 comments
Please sign in to leave a comment.