Implement test suite loading and reporting functionality
- Added `TestSuiteDefinition`, `TestGroupDefinition`, and `TestCaseDefinition` structures to represent test suite configurations. - Implemented parsing logic for test suite definitions from a file in `test_suite_loader.cc` and `test_suite_loader.h`. - Introduced `ReplayTestResult` structure in `gui_automation_client.h` to handle results from replaying tests. - Added `ReplayTest` method in `GuiAutomationClient` to facilitate test replay functionality. - Created `BuildTextSummary` and `BuildJUnitReport` functions in `test_suite_reporter.cc` for generating test reports. - Implemented `WriteJUnitReport` function to save JUnit formatted reports to a specified output path. - Enhanced error handling and logging throughout the new functionalities.
This commit is contained in:
@@ -125,6 +125,15 @@ struct TestResultDetails {
|
||||
std::string widget_state;
|
||||
};
|
||||
|
||||
struct ReplayTestResult {
|
||||
bool success = false;
|
||||
std::string message;
|
||||
std::string replay_session_id;
|
||||
int steps_executed = 0;
|
||||
std::vector<AssertionOutcome> assertions;
|
||||
std::vector<std::string> logs;
|
||||
};
|
||||
|
||||
enum class WidgetTypeFilter {
|
||||
kUnspecified,
|
||||
kAll,
|
||||
@@ -290,6 +299,10 @@ class GuiAutomationClient {
|
||||
absl::StatusOr<DiscoverWidgetsResult> DiscoverWidgets(
|
||||
const DiscoverWidgetsQuery& query);
|
||||
|
||||
absl::StatusOr<ReplayTestResult> ReplayTest(
|
||||
const std::string& script_path, bool ci_mode,
|
||||
const std::map<std::string, std::string>& parameter_overrides = {});
|
||||
|
||||
/**
|
||||
* @brief Check if client is connected
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user