@@ -3,6 +3,7 | |||||
3 | const QString NB_MAX_OPERATIONS_PROPERTY = QStringLiteral("component"); |
|
3 | const QString NB_MAX_OPERATIONS_PROPERTY = QStringLiteral("component"); | |
4 | const QString NB_MAX_VARIABLES_PROPERTY = QStringLiteral("nbMaxVariables"); |
|
4 | const QString NB_MAX_VARIABLES_PROPERTY = QStringLiteral("nbMaxVariables"); | |
5 | const QString AVAILABLE_OPERATIONS_PROPERTY = QStringLiteral("availableOperations"); |
|
5 | const QString AVAILABLE_OPERATIONS_PROPERTY = QStringLiteral("availableOperations"); | |
|
6 | const QString CACHE_TOLERANCE_PROPERTY = QStringLiteral("cacheTolerance"); | |||
6 | const QString INITIAL_RANGE_PROPERTY = QStringLiteral("initialRange"); |
|
7 | const QString INITIAL_RANGE_PROPERTY = QStringLiteral("initialRange"); | |
7 | const QString MAX_RANGE_PROPERTY = QStringLiteral("maxRange"); |
|
8 | const QString MAX_RANGE_PROPERTY = QStringLiteral("maxRange"); | |
8 | const QString METADATA_POOL_PROPERTY = QStringLiteral("metadataPool"); |
|
9 | const QString METADATA_POOL_PROPERTY = QStringLiteral("metadataPool"); |
@@ -30,6 +30,8 extern const QString NB_MAX_VARIABLES_PROPERTY; | |||||
30 | /// Set of operations available for the test |
|
30 | /// Set of operations available for the test | |
31 | extern const QString AVAILABLE_OPERATIONS_PROPERTY; |
|
31 | extern const QString AVAILABLE_OPERATIONS_PROPERTY; | |
32 |
|
32 | |||
|
33 | /// Tolerance used for variable's cache (in ratio) | |||
|
34 | extern const QString CACHE_TOLERANCE_PROPERTY; | |||
33 |
|
35 | |||
34 | /// Range with which the timecontroller is initialized |
|
36 | /// Range with which the timecontroller is initialized | |
35 | extern const QString INITIAL_RANGE_PROPERTY; |
|
37 | extern const QString INITIAL_RANGE_PROPERTY; |
@@ -5,6 +5,7 | |||||
5 | #include "AmdaProvider.h" |
|
5 | #include "AmdaProvider.h" | |
6 |
|
6 | |||
7 | #include <Network/NetworkController.h> |
|
7 | #include <Network/NetworkController.h> | |
|
8 | #include <Settings/SqpSettingsDefs.h> | |||
8 | #include <SqpApplication.h> |
|
9 | #include <SqpApplication.h> | |
9 | #include <Time/TimeController.h> |
|
10 | #include <Time/TimeController.h> | |
10 | #include <Variable/Variable.h> |
|
11 | #include <Variable/Variable.h> | |
@@ -47,6 +48,7 const auto AVAILABLE_OPERATIONS_DEFAULT_VALUE | |||||
47 | {FuzzingOperationType::PAN_RIGHT, 1.}, |
|
48 | {FuzzingOperationType::PAN_RIGHT, 1.}, | |
48 | {FuzzingOperationType::ZOOM_IN, 1.}, |
|
49 | {FuzzingOperationType::ZOOM_IN, 1.}, | |
49 | {FuzzingOperationType::ZOOM_OUT, 1.}}); |
|
50 | {FuzzingOperationType::ZOOM_OUT, 1.}}); | |
|
51 | const auto CACHE_TOLERANCE_DEFAULT_VALUE = 0.2; | |||
50 |
|
52 | |||
51 | /// Delay between each operation (in ms) |
|
53 | /// Delay between each operation (in ms) | |
52 | const auto OPERATION_DELAY_DEFAULT_VALUE = 3000; |
|
54 | const auto OPERATION_DELAY_DEFAULT_VALUE = 3000; | |
@@ -223,6 +225,12 void TestAmdaFuzzing::testFuzzing() | |||||
223 | { |
|
225 | { | |
224 | QFETCH(Properties, properties); |
|
226 | QFETCH(Properties, properties); | |
225 |
|
227 | |||
|
228 | // Sets cache property | |||
|
229 | QSettings settings{}; | |||
|
230 | auto cacheTolerance = properties.value(CACHE_TOLERANCE_PROPERTY, CACHE_TOLERANCE_DEFAULT_VALUE); | |||
|
231 | settings.setValue(GENERAL_TOLERANCE_AT_INIT_KEY, cacheTolerance); | |||
|
232 | settings.setValue(GENERAL_TOLERANCE_AT_UPDATE_KEY, cacheTolerance); | |||
|
233 | ||||
226 | auto &variableController = sqpApp->variableController(); |
|
234 | auto &variableController = sqpApp->variableController(); | |
227 | auto &timeController = sqpApp->timeController(); |
|
235 | auto &timeController = sqpApp->timeController(); | |
228 |
|
236 | |||
@@ -260,6 +268,9 int main(int argc, char *argv[]) | |||||
260 | "TestAmdaFuzzing.info=true\n"); |
|
268 | "TestAmdaFuzzing.info=true\n"); | |
261 |
|
269 | |||
262 | SqpApplication app{argc, argv}; |
|
270 | SqpApplication app{argc, argv}; | |
|
271 | SqpApplication::setOrganizationName("LPP"); | |||
|
272 | SqpApplication::setOrganizationDomain("lpp.fr"); | |||
|
273 | SqpApplication::setApplicationName("SciQLop-TestFuzzing"); | |||
263 | app.setAttribute(Qt::AA_Use96Dpi, true); |
|
274 | app.setAttribute(Qt::AA_Use96Dpi, true); | |
264 | TestAmdaFuzzing testObject{}; |
|
275 | TestAmdaFuzzing testObject{}; | |
265 | QTEST_SET_MAIN_SOURCE_PATH |
|
276 | QTEST_SET_MAIN_SOURCE_PATH |
General Comments 0
You need to be logged in to leave comments.
Login now