API Documentation
Loading...
Searching...
No Matches
AutomatedTesting.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/RibbonSubGroup.h>
3#include <NDEVR/QTWindowManager.h>
4#include <NDEVR/File.h>
5#include <QWidget>
6namespace NDEVR
7{
8 class AutomatedTestingDialog;
9 class WindowManager;
10
11 /**--------------------------------------------------------------------------------------------------
12 Class: AutomatedTest
13
14 \brief base class for performing a test for easily testing certain software functionality
15 *-----------------------------------------------------------------------------------------------**/
17 {
18 public:
22 virtual void stopTest() = 0;
23 std::function<void()> on_test_completed;
24 bool is_looped_test = false;
25 };
27 {
28 public:
29 LoopedAutomatedTest(const std::function<void(uint04 step_index, AutomatedTestingDialog* dialog)>& test_step);
30 bool performTest(AutomatedTestingDialog* dialog);
31 void stopTest();
32 uint04 testStepIndex() const { return m_step_index; }
33 protected:
34 std::function<void(uint04 step_index, AutomatedTestingDialog* dialog)> m_on_test;
35 QTimer* m_test_timer;
36 AutomatedTestingDialog* m_dialog = nullptr;
37 uint04 m_step_index = 0;
38 };
40 {
41 public:
43 };
45 {
46 public:
48 };
50 {
51 public:
53 bool performTest(AutomatedTestingDialog* dialog);
54 void stopTest();
55 };
56 class Connection;
57 /**--------------------------------------------------------------------------------------------------
58 Class: AutomatedTestingDialog
59
60 \brief Gives user information and allows execution for all registered automated testing.
61 *-----------------------------------------------------------------------------------------------**/
63 {
64 public:
65 AutomatedTestingDialog(QWidget* parent = nullptr);
66 void chooseTestFolder();
67 void addTest(AutomatedTest* test);
68 static void AddTest(AutomatedTest* test);
69 File testFolder() const;
70 protected:
73 protected:
75 };
76}
#define NDEVR_API
Definition DLLInfo.h:67
base class for performing a test for easily testing certain software functionality
Definition AutomatedTesting.h:17
virtual void stopTest()=0
String icon
Definition AutomatedTesting.h:19
bool is_looped_test
Definition AutomatedTesting.h:24
TranslatedString name
Definition AutomatedTesting.h:20
virtual bool performTest(AutomatedTestingDialog *)=0
std::function< void()> on_test_completed
Definition AutomatedTesting.h:23
Gives user information and allows execution for all registered automated testing.
Definition AutomatedTesting.h:63
Buffer< AutomatedTest * > m_automated_tests
Definition AutomatedTesting.h:72
static Buffer< AutomatedTest * > s_application_tests
Definition AutomatedTesting.h:74
File m_test_folder
Definition AutomatedTesting.h:71
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Connection.h:171
Definition File.h:47
Definition AutomatedTesting.h:50
Definition AutomatedTesting.h:27
std::function< void(uint04 step_index, AutomatedTestingDialog *dialog)> m_on_test
Definition AutomatedTesting.h:34
uint04 testStepIndex() const
Definition AutomatedTesting.h:32
QTimer * m_test_timer
Definition AutomatedTesting.h:35
Definition AutomatedTesting.h:40
Definition AutomatedTesting.h:45
Definition RibbonSubGroup.h:43
Definition String.h:40
Definition TranslatedString.h:9
Definition WindowManager.h:68
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120