hongji.li
2023-11-07 1a1ba3ad5ed9e4380185aa1ccad20204a0e5f115
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
*** Settings ***
Documentation  Write something about your test suites
...            All tests contain a workflow constructed from keywords in
 
Library  qtestlib
Library  OperatingSystem
 
Suite Setup  TestSuite Initialize
Suite Teardown  TestSuite Finalize
 
Test Timeout  360
 
*** Variables ***
# Do not change remove this, we need these for ALM execution
&{alm_params}
 
# Do not remove this, special pamater ALM and RnD local run
# Provide alternative to specify the external configuration from cmd
&{external_settings}
 
# Set the Quintiq settings
# Available settings are:
# ignore_errors=12345,23456  warn_errors=12345,23456  suite_settings_file=local_local.yaml  suite_settings_section=Database.MSSQL2012
# suite_settings_file=local_Products_MP.yaml
&{quintiq_settings}=  ignore_errors=113796
 
# Do not change these set of parameters, for library internal usage
&{global_params}=  current_dir=${CURDIR}  &{quintiq_settings}  &{external_settings}  &{alm_params}
 
# Set QExecutable commandline argumment, for eg: /webserverport=8888  /webservermode=2
@{qdbodbc_param}
 
# Do not use qserver-param for permanent change, but use model role config or local config for ci
@{qserver_param}
 
# Set the QExecutable settings:
# Default value for max_start_time, max_shutdown_time, max_execution_time are 100
# Available settings are:
# max_start_time=${120}  max_shutdown_time=${120}  max_execution_time=${120}  ignore_errors=12345,23456  warn_errors=12345,23456
&{qserver_settings}=  max_start_time=${300}  max_execution_time=${1200}
 
# Set the mdsstoragedefinition settings, leave it empty and it will use the settings in local settings file(yaml/json)
# Available settings are:
# audit_trail_enabled=False  audit_trail_location=${EMPTY}  database_enabled=True  datasetstore_datasource=DEFAULT  datasetstore_enabled=False
# datasetstore_is_local=False  db_format=Legacy  driver=ODBC  max_column_name=0  max_table_name=0  name=  ${EMPTY}oci_connection_basic_host=${EMPTY}
# oci_connection_basic_port=1521  oci_connection_basic_service=${EMPTY}  oci_connection_tns_name=${EMPTY}  oci_connection_type=Basic  parameters=${EMPTY}  password=${EMPTY}
&{mdsstoragedefinition}
 
*** Keywords ***
TestSuite Initialize
  Initialize  &{global_params}
  Setup Model Settings
 
  Register QComponent  QServer  MyServer  @{qserver_param}  &{qserver_settings}
  Start QComponent  MyServer
  Sleep  1 minute
  
TestSuite Finalize
  Run Keyword If Any Tests Failed  QTestLib.Handle_Failure  Check if any failure detected in child test execution
  Inspect Failure
  Finish
  
*** Test Cases ***
# Execute UTF TestSuite  MyServer  testsuite.xml
UnitTest_UTF_UnitTestOptTestInstances
  Execute UTF  MyServer  UTF_UnitTestOptTestInstances
UnitTest_UTF_UnitTestOptTestInstancesPart2
  Execute UTF  MyServer  UTF_UnitTestOptTestInstancesPart2
UnitTest_UTF_UnitTestOptTestInstancesTestFixedCampaignInHistoricalPeriod 
  Execute UTF  MyServer  UTF_UnitTestOptTestInstancesTestFixedCampaignInHistoricalPeriod
UnitTest_UTF_UnitTestOptTestInstancesTestFixedCampaignInUnitFrozenPeriod
  Execute UTF  MyServer  UTF_UnitTestOptTestInstancesTestFixedCampaignInUnitFrozenPeriod
UnitTest_UTF_UnitTestMPDefaultSalesCostDriver
  Execute UTF  MyServer  UTF_UnitTestMPDefaultSalesCostDriver
UnitTest_UTF_UnitTestMPRollbackKPIProcMinQty
  Execute UTF  MyServer  UTF_UnitTestMPRollbackKPIProcMinQty
UnitTest_UTF_UnitTestMPStrategyOverrideFocusLevel
  Execute UTF  MyServer  UTF_UnitTestMPStrategyOverrideFocusLevel    
UnitTest_UTF_UnitTestMPTripConstraintLotSizeTransportCapacity
  Execute UTF  MyServer  UTF_UnitTestMPTripConstraintLotSizeTransportCapacity
UnitTest_UTF_UnitTestVerifyChangeOfSalesDemandThreshold
  Execute UTF  MyServer     UTF_UnitTestMPVerifyChangeOfSalesDemandThreshold  
UnitTest_UTF_UnitTestMPVerifyFoodBaseCampaignMeta
  Execute UTF  MyServer  UTF_UnitTestMPVerifyFoodBaseCampaignMeta   
UnitTest_UTF_UnitTestMPVerifyManualPlanPTDemand 
  Execute UTF  MyServer  UTF_UnitTestMPVerifyManualPlanPTDemand
UnitTest_UTF_UnitTestMPVerifyMetalBaseMetaOptimizer
  Execute UTF  MyServer  UTF_UnitTestMPVerifyMetalBaseMetaOptimizer
UnitTest_UTF_UnitTestMPVerifyMetalBaseMinInventoryPriorToScope
  Execute UTF  MyServer  UTF_UnitTestMPVerifyMetalBaseMinInventoryPriorToScope