xtesting.core.feature module¶
Define the parent classes of all Xtesting Features.
Feature is considered as TestCase offered by Third-party. It offers helpers to run any python method or any bash command.
-
class
xtesting.core.feature.
BashFeature
(**kwargs)¶ Bases:
xtesting.core.feature.Feature
Class designed to run any bash command.
-
execute
(**kwargs)¶ Execute the cmd passed as arg
- Args:
- kwargs: Arbitrary keyword arguments.
- Returns:
- 0 if cmd returns 0, -1 otherwise.
-
-
class
xtesting.core.feature.
Feature
(**kwargs)¶ Bases:
xtesting.core.testcase.TestCase
Base model for single feature.
-
execute
(**kwargs)¶ Execute the Python method.
The subclasses must override the default implementation which is false on purpose.
The new implementation must return 0 if success or anything else if failure.
- Args:
- kwargs: Arbitrary keyword arguments.
-
run
(**kwargs)¶ Run the feature.
It allows executing any Python method by calling execute().
It sets the following attributes required to push the results to DB:
- result,
- start_time,
- stop_time.
It doesn’t fulfill details when pushing the results to the DB.
- Args:
- kwargs: Arbitrary keyword arguments.
- Returns:
- TestCase.EX_OK if execute() returns 0, TestCase.EX_RUN_ERROR otherwise.
-