Reactis API V2020
API - Reactis: C Bindings - Reactis Test Suites
rsSuiteOpen
Open an existing Reactis test suite file.
Loads a test suite from a file.
Syntax
RsTestSuite *rsSuiteOpen(RsHandle *h, const char *testSuiteFileName);
Parameters
- h
- Pointer to RsHandle structure as returned by rsOpen.
- testSuiteFileName
- Path and name of the Reactis test suite file (.rst file) to open.
Return Value
Pointer to a RsTestSuite structure that can be run in a simulator
session. A NULL value is returned if file does not exist or cannot be read.
rsSuiteClose
Close a test suite file.
Closes a test suite that was opened by rsSuiteOpen or created by
rsTester.
Syntax
void rsSuiteClose (RsTestSuite *suite);
Parameters
- suite
- Pointer to RsTestSuite structure as returned by rsSuiteOpen or
rsTester.
Return Value
None.
rsSuiteSave
Save changes to a .rsi file.
Saves a test suite.
Syntax
int rsSuiteSave (RsTestSuite *suite, const char *filename);
Parameters
- suite
- Pointer to RsTestSuite structure as returned by rsSuiteOpen or rsTester.
- filename
- Filename and path to which the suite should be saved.
Return Value
0 if saving failed, non-zero otherwise.
rsSuiteGetNumTests
Get number of tests in a test suite.
Returns the number of tests in a test suite.
Syntax
int rsSuiteGetNumTests (RsTestSuite *suite);
Parameters
- suite
- Pointer to RsTestSuite structure as returned by rsSuiteOpen or
rsTester.
Return Value
Returns the number of tests in the test suite specified by the suite
parameter or -1 if an error occurred. In that case, you may call
rsGetLastError to retrieve the error message string.
rsSuiteGetTestNumSteps
Get number of steps in test suite.
Returns the number of steps for a test in a test suite.
Syntax
int rsSuiteGetNumTestSteps (RsTestSuite *suite, int index);
Parameters
- suite
- Pointer to RsTestSuite structure as returned by rsSuiteOpen or
rsTester.
- index
- Index of the test to query. This value must be greater or equal to 0 and
less than the return value of rsSuiteGetNumTests.
Return Value
Returns the number of steps in the test specified by the index parameter in
the test suite specified by the suite parameter or -1 if an error
occurred. In that case, you may call rsGetLastError to retrieve the
error message string.
rsSuiteGetTestName
Get name of a test in test suite.
Returns the name of a test in a test suite.
Syntax
int rsSuiteGetTestName (
RsTestSuite *suite,
int index,
char *buffer,
int bufferSize
);
Parameters
- suite
- Pointer to RsTestSuite structure as returned by rsSuiteOpen or
rsTester.
- index
- Index of the test to query. This value must be greater or equal to 0 and
less than the return value of rsSuiteGetNumTests.
- buffer
- The buffer that receives the test name. The buffer’s size must correspond
to the value of the bufferSize parameter. If the buffer parameter
is NULL, then the value returned by rsSuiteGetTestName will be the
buffer size required to store the whole name.
- bufferSize
- The size of the buffer passed in as the third argument. If the
actual name is longer than this value, it will be truncated to the length
of the buffer. In that case, the return value of rsSuiteGetTestName will be
the buffer size that would be required to receive the whole name.
Return Value
Returns -1 if an error occurred. In this case, you may call
rsGetLastError to retrieve the error message string.
Returns 0 on success.
Returns a value greater than 0 if either the buffer parameter is
NULL or the bufferSize was not sufficient to receive the complete
name. In that case, the value returned specifies the buffer size required to
store the complete name.
rsSuiteGetReactisVersion
Get Reactis version of test suite.
Returns the version of Reactis that created this test suite.
Syntax
const char *rsSuiteGetReactisVersion(RsTestSuite *suite);
Parameters
- suite
- Pointer to RsTestSuite structure as returned by rsSuiteOpen or rsTester.
Return Value
Pointer to an internal character buffer containing the Reactis version
string. For information on version string composition see appendix
C. NULL, if an error occurred while retrieving the version. In that
case, you may call rsGetLastError to retrieve the error message
string.