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 \brief base class for performing a test for easily testing certain software functionality
13
14 **/
16 {
17 public:
21 virtual void stopTest() = 0;
22 std::function<void()> on_test_completed;
23 bool is_looped_test = false;
24 };
25 /**--------------------------------------------------------------------------------------------------
26 \brief A type of AutomatedTest that repeatedly loops until stopped by the user.
27
28 **/
30 {
31 public:
32 LoopedAutomatedTest(const std::function<void(uint04 step_index, AutomatedTestingDialog* dialog)>& test_step);
34 void stopTest();
35 uint04 testStepIndex() const { return m_step_index; }
36 protected:
37 std::function<void(uint04 step_index, AutomatedTestingDialog* dialog)> m_on_test;
38 QTimer* m_test_timer;
39 AutomatedTestingDialog* m_dialog = nullptr;
40 uint04 m_step_index = 0;
41 };
42 /**--------------------------------------------------------------------------------------------------
43 \brief Provides an AutomatedTest for repeatedly creating and destroying Projects
44
45 **/
47 {
48 public:
50 };
51 /**--------------------------------------------------------------------------------------------------
52 \brief Provides an AutomatedTest for repeatedly opening and closing a Project
53
54 **/
56 {
57 public:
59 };
60 /**--------------------------------------------------------------------------------------------------
61 \brief Provides an AutomatedTest for grabbing network information.
62
63 **/
65 {
66 public:
69 void stopTest();
70 };
71 class Connection;
72 /**--------------------------------------------------------------------------------------------------
73 \brief Gives user information and allows execution for all registered automated testing.
74
75 **/
90}
#define NDEVR_API
Definition DLLInfo.h:50
base class for performing a test for easily testing certain software functionality
Definition AutomatedTesting.h:16
virtual void stopTest()=0
String icon
Definition AutomatedTesting.h:18
bool is_looped_test
Definition AutomatedTesting.h:23
TranslatedString name
Definition AutomatedTesting.h:19
virtual bool performTest(AutomatedTestingDialog *)=0
std::function< void()> on_test_completed
Definition AutomatedTesting.h:22
Gives user information and allows execution for all registered automated testing.
Definition AutomatedTesting.h:77
Buffer< AutomatedTest * > m_automated_tests
Definition AutomatedTesting.h:86
static Buffer< AutomatedTest * > s_application_tests
Definition AutomatedTesting.h:88
AutomatedTestingDialog(QWidget *parent=nullptr)
File m_test_folder
Definition AutomatedTesting.h:85
void addTest(AutomatedTest *test)
static void AddTest(AutomatedTest *test)
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A standard interface for all types of connections that allow transmitting and recieving of data betwe...
Definition Connection.h:198
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
Provides an AutomatedTest for grabbing network information.
Definition AutomatedTesting.h:65
GrabNetworkInfo(WindowManager *manager)
bool performTest(AutomatedTestingDialog *dialog)
A type of AutomatedTest that repeatedly loops until stopped by the user.
Definition AutomatedTesting.h:30
LoopedAutomatedTest(const std::function< void(uint04 step_index, AutomatedTestingDialog *dialog)> &test_step)
std::function< void(uint04 step_index, AutomatedTestingDialog *dialog)> m_on_test
Definition AutomatedTesting.h:37
uint04 testStepIndex() const
Definition AutomatedTesting.h:35
bool performTest(AutomatedTestingDialog *dialog)
QTimer * m_test_timer
Definition AutomatedTesting.h:38
Provides an AutomatedTest for repeatedly creating and destroying Projects.
Definition AutomatedTesting.h:47
NewProjectTest(WindowManager *manager)
Provides an AutomatedTest for repeatedly opening and closing a Project.
Definition AutomatedTesting.h:56
OpenCloseTest(WindowManager *manager)
Represents a sub-section of "Tab" of a ribbon represting a grouping of buttons or widgets within a ta...
Definition RibbonSubGroup.h:47
The core String class for the NDEVR API.
Definition String.h:69
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
Manages all windows and logic surrounding dialogs and views for displaying and managing any environme...
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:96