|
| cSessionTestSystem (const std::string &strUrl="", const std::string &strAdtfDirectory=ADTF_TESTING_ADTF_DIR, const std::string &strPluginDirectories=ADTF_TESTING_PLUGIN_DIRECTORIES) |
| Constructs a test system. More...
|
|
| cSessionTestSystem (const std::string &strUrl, bool bCreateLoggingService, const std::string &strAdtfDirectory=ADTF_TESTING_ADTF_DIR, const std::string &strPluginDirectories=ADTF_TESTING_PLUGIN_DIRECTORIES) |
| Constructs a test system. More...
|
|
void | SetEnvironmentFile (const std::string &strFileName) |
| Set the adtfenvironment. More...
|
|
void | CreateSession (const std::string &strFileName) |
| Load and create a session. More...
|
|
void | Exec (std::chrono::microseconds tmTimeout) |
| Executes a session for a given amount of time. More...
|
|
void | Exec (int8_t nInitialRunlevel, std::function< void()> fnStartup) |
| Executes a session and call the a callback function when ready. More...
|
|
void | ExecTest (int8_t nInitialRunlevel, std::function< void()> fnTest) |
| Execute a session, call a test function and shutdown the session afterwards. More...
|
|
ucom::ant::object_ptr< services::ant::ISession > | GetSession () |
|
ucom::ant::object_ptr< streaming::ant::IStreamingGraph > | GetStreamingGraph () |
|
ucom::ant::object_ptr< streaming::ant::IFilterGraph > | GetFilterGraph () |
|
ucom::ant::object_ptr< streaming::ant::INamedGraphObject > | GetGraphObject (const std::string &name) |
| Retrieve a graph object from the streaming/filter graph. More...
|
|
| cTestSystem (const std::string &strUrl="", const std::vector< std::string > &oPlugins={}, bool bCreateSessionManager=false, const std::string &strAdtfDirectory=ADTF_TESTING_ADTF_DIR, const std::string &strPluginDirectories=ADTF_TESTING_PLUGIN_DIRECTORIES) |
| Constructs a test system. More...
|
|
| cTestSystem (const std::string &strUrl, const std::vector< std::string > &oPlugins, bool bCreateSessionManager, bool bCreateLoggingService, const std::string &strAdtfDirectory=ADTF_TESTING_ADTF_DIR, const std::string &strPluginDirectories=ADTF_TESTING_PLUGIN_DIRECTORIES) |
| Constructs a test system. More...
|
|
| ~cTestSystem () |
| Destructor.
|
|
void | SetRunLevel (base::ant::tADTFRunLevel eRunlevel) |
| Helper function that changes the runlevel and throws errors via an exception. More...
|
|
base::ant::tADTFRunLevel | GetRunLevel () const |
| Helper function that returns the current runlevel. More...
|
|
void | LoadPlugin (const std::string &strPluginFileName, bool bCreateServices=true, base::ant::tADTFRunLevel nServicesRunlevel=base::tADTFRunLevel::RL_System) |
| Load a plugin and optionally create instances of all found ADTF Service classes. More...
|
|
ucom::ant::object_ptr< ucom::ant::IService > | CreateService (const std::string &strClassId, const std::string &strObjectId, base::ant::tADTFRunLevel nRunlevel=base::tADTFRunLevel::RL_System) |
| Create a service instance. More...
|
|
ucom::ant::object_ptr< ucom::ant::IService > | CreateService (const std::string &strPluginFileName, const std::string &strClassId, const std::string &strObjectId, base::ant::tADTFRunLevel nRunlevel=base::tADTFRunLevel::RL_System) |
| Loads a plugin and creates a service instance. More...
|
|
ucom::ant::object_ptr< ucom::ant::IService > | CreateService (const std::string &strClassId, const std::string &strObjectId, base::ant::tADTFRunLevel nRunlevel, const std::map< std::string, std::string > &oProperties) |
| Create a service instance with properties. More...
|
|
ucom::ant::object_ptr< ucom::ant::IService > | CreateService (const std::string &strPluginFileName, const std::string &strClassId, const std::string &strObjectId, base::ant::tADTFRunLevel nRunlevel, const std::map< std::string, std::string > &oProperties) |
| Load a plugin and create a service instance with properties. More...
|
|
This class allows you to create a test system based on an ADTF session.
Example Usage
{
public:
cMyTestSystem()
{
}
};
void my_test_function()
{
cMyTestSystem oSystem;
auto pMyFilter = oSystem.GetGraphObject("filter_graph_name.my_filter");
auto oOutput = oRecorder.GetCurrentOutput();
if (oOutput.GetSamples().empty())
{
throw std::runtime_error("filter did not create samples");
}
}
Test Helper class that records triggers, types and samples created by a graph object.
This class allows you to create a test system based on an ADTF session.
void CreateSession(const std::string &strFileName)
Load and create a session.
void SetRunLevel(base::ant::tADTFRunLevel eRunlevel)
Helper function that changes the runlevel and throws errors via an exception.
std::chrono::seconds seconds
Compatibility to C++11 std::chrono::seconds
@ RL_FilterGraph
The Filtergraph level.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
- Note
- Our adtf_add_catch_test() macro from ADTF Testing SDK will define the ADTF_TESTING_ADTF_DIR and ADTF_TESTING_ADTF_DIR macros. If you use another testing framework make sure you either pass values directly to the constructor or add these definitions as well.
Definition at line 243 of file test_system.h.