RobotTestingFramework 2.0.1
Robot Testing Framework
Loading...
Searching...
No Matches
robottestingframework::plugin::RubyPluginLoaderImpl Class Reference

The RubyPluginLoaderImpl loads a ruby test case plug-in and gives the direct access to the TestCase. More...

#include <robottestingframework/ruby/impl/RubyPluginLoader_impl.h>

Inheritance diagram for robottestingframework::plugin::RubyPluginLoaderImpl:

Public Member Functions

 RubyPluginLoaderImpl ()
 RubyPluginLoaderImpl constructor.
 ~RubyPluginLoaderImpl () override
 RubyPluginLoaderImpl destructor.
TestCaseopen (const std::string filename)
 open Loads a test case plugin
void close ()
 close Unloads the plugin and deletes any allocated memory.
std::string getLastError ()
 getLastError gets the last error if any.
std::string getFileName ()
 getFileName returns the loaded script file name
void setTestName (const std::string name)
 setTestName set the test case name
bool setup (int argc, char **argv) override
 setup is called before the test run.
void tearDown () override
 tearDown is called after the test run
void run () override
 run is called by the TestCase class if setup is successfull;
Public Member Functions inherited from robottestingframework::TestCase
 TestCase (std::string name, std::string param="")
 TestCase constructor.
virtual ~TestCase ()
 TestCase destructor.
void interrupt () override
 interrupt interrupts the current test run
void run (TestResult &rsl) override
 the main caller of a TestCase inherited from Test Class.
bool succeeded () const override
 succeeded
void failed ()
 failed Sets the test successful flag to false which indicates that the test was not successful.
TestResultgetResult ()
 getResult Returns an instance of TestResult if run(TestResult &result) has been already called by a TestRunner
void setParam (const std::string param)
 setParam Sets the optional parameters of the test.
std::string getParam ()
 getParam gets the original paramter string which is set for the test case
void setEnvironment (const std::string environment)
 setEnvironment Optioanlly specifies the environment in which the test case is executed.
std::string getEnvironment ()
 getParam gets the environment string which is set for the test case
void setRepetition (unsigned int rep)
 setRepetition sets the run repetition by default the run() method is called only once; The number of test runs (e.g., for stress testing) can be set using this function.
unsigned int getRepetition ()
 getRepetition gets the tun repetition
Public Member Functions inherited from robottestingframework::Test
 Test (std::string name, std::string description="")
 Test constructor.
virtual ~Test ()
 Test destructor.
const std::string getName () const
 getName Getting test name.
const std::string getDescription () const
 getDescription Getting test description
void setDescription (const std::string description)
 setDescription Sets an optional string which describes the test.

Private Member Functions

std::string extractFileName (const std::string &path)

Static Private Member Functions

static RubyPluginLoaderImplgetImpFromRuby ()
static std::string getRubyErrorMessage ()
static std::string getRubyBackTrace ()
static VALUE wrapSetup (VALUE args)
static VALUE protectedSetup (VALUE testcase, ID id, VALUE param, RubyPluginLoaderImpl *impl)
static VALUE wrapRun (VALUE args)
static VALUE protectedRun (VALUE testcase, ID id, RubyPluginLoaderImpl *impl)
static VALUE wrapTearDown (VALUE args)
static VALUE protectedTearDown (VALUE testcase, ID id, RubyPluginLoaderImpl *impl)
static VALUE setName (VALUE self, VALUE obj)
static VALUE assertError (VALUE self, VALUE obj)
static VALUE assertFail (VALUE self, VALUE obj)
static VALUE testReport (VALUE self, VALUE obj)
static VALUE testCheck (VALUE self, VALUE cond, VALUE message)

Private Attributes

std::string filename
std::string error
VALUE testcase
VALUE RobotTestingFrameworkModule

Additional Inherited Members

Protected Member Functions inherited from robottestingframework::Test
void setName (std::string name)
 setName setting the test name

Detailed Description

The RubyPluginLoaderImpl loads a ruby test case plug-in and gives the direct access to the TestCase.

Definition at line 37 of file RubyPluginLoader_impl.h.

Constructor & Destructor Documentation

◆ RubyPluginLoaderImpl()

robottestingframework::plugin::RubyPluginLoaderImpl::RubyPluginLoaderImpl ( )

RubyPluginLoaderImpl constructor.

◆ ~RubyPluginLoaderImpl()

robottestingframework::plugin::RubyPluginLoaderImpl::~RubyPluginLoaderImpl ( )
override

RubyPluginLoaderImpl destructor.

Member Function Documentation

◆ assertError()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::assertError ( VALUE self,
VALUE obj )
staticprivate

◆ assertFail()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::assertFail ( VALUE self,
VALUE obj )
staticprivate

◆ close()

void robottestingframework::plugin::RubyPluginLoaderImpl::close ( )

close Unloads the plugin and deletes any allocated memory.

◆ extractFileName()

std::string robottestingframework::plugin::RubyPluginLoaderImpl::extractFileName ( const std::string & path)
private

◆ getFileName()

std::string robottestingframework::plugin::RubyPluginLoaderImpl::getFileName ( )

getFileName returns the loaded script file name

Returns
the script file name

◆ getImpFromRuby()

RubyPluginLoaderImpl * robottestingframework::plugin::RubyPluginLoaderImpl::getImpFromRuby ( )
staticprivate

◆ getLastError()

std::string robottestingframework::plugin::RubyPluginLoaderImpl::getLastError ( )

getLastError gets the last error if any.

Returns
returns the last error string.

◆ getRubyBackTrace()

std::string robottestingframework::plugin::RubyPluginLoaderImpl::getRubyBackTrace ( )
staticprivate

◆ getRubyErrorMessage()

std::string robottestingframework::plugin::RubyPluginLoaderImpl::getRubyErrorMessage ( )
staticprivate

◆ open()

TestCase * robottestingframework::plugin::RubyPluginLoaderImpl::open ( const std::string filename)

open Loads a test case plugin

Parameters
filenamethe plugin filename
Returns
A pointer to the test case loaded from the plugin or a null pointer in case of failure.

◆ protectedRun()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::protectedRun ( VALUE testcase,
ID id,
RubyPluginLoaderImpl * impl )
staticprivate

◆ protectedSetup()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::protectedSetup ( VALUE testcase,
ID id,
VALUE param,
RubyPluginLoaderImpl * impl )
staticprivate

◆ protectedTearDown()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::protectedTearDown ( VALUE testcase,
ID id,
RubyPluginLoaderImpl * impl )
staticprivate

◆ run()

void robottestingframework::plugin::RubyPluginLoaderImpl::run ( )
overridevirtual

run is called by the TestCase class if setup is successfull;

Implements robottestingframework::TestCase.

◆ setName()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::setName ( VALUE self,
VALUE obj )
staticprivate

◆ setTestName()

void robottestingframework::plugin::RubyPluginLoaderImpl::setTestName ( const std::string name)

setTestName set the test case name

Parameters
namethe test case name

◆ setup()

bool robottestingframework::plugin::RubyPluginLoaderImpl::setup ( int argc,
char ** argv )
overridevirtual

setup is called before the test run.

Note
the first value in argv is the name of the current testcases
Parameters
argcThe number of the pasred argument from string paramter
argvThe arguments which is parsed using string paramter
Returns
true or false depending of the test initialization

Reimplemented from robottestingframework::TestCase.

◆ tearDown()

void robottestingframework::plugin::RubyPluginLoaderImpl::tearDown ( )
overridevirtual

tearDown is called after the test run

Reimplemented from robottestingframework::TestCase.

◆ testCheck()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::testCheck ( VALUE self,
VALUE cond,
VALUE message )
staticprivate

◆ testReport()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::testReport ( VALUE self,
VALUE obj )
staticprivate

◆ wrapRun()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::wrapRun ( VALUE args)
staticprivate

◆ wrapSetup()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::wrapSetup ( VALUE args)
staticprivate

◆ wrapTearDown()

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::wrapTearDown ( VALUE args)
staticprivate

Member Data Documentation

◆ error

std::string robottestingframework::plugin::RubyPluginLoaderImpl::error
private

Definition at line 112 of file RubyPluginLoader_impl.h.

◆ filename

std::string robottestingframework::plugin::RubyPluginLoaderImpl::filename
private

Definition at line 111 of file RubyPluginLoader_impl.h.

◆ RobotTestingFrameworkModule

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::RobotTestingFrameworkModule
private

Definition at line 114 of file RubyPluginLoader_impl.h.

◆ testcase

VALUE robottestingframework::plugin::RubyPluginLoaderImpl::testcase
private

Definition at line 113 of file RubyPluginLoader_impl.h.


The documentation for this class was generated from the following file: