Skip to content

Commit ff24451

Browse files
committed
Test Case Generator v2
1 parent 3bd3757 commit ff24451

8 files changed

Lines changed: 485 additions & 244 deletions

File tree

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,10 @@ This project uses the following major libraries:
7171
## Getting Started
7272

7373
### Setting Up
74-
- **Files -> Select Command File**
75-
> Select the commands (`.xlsx`) file from menu.
76-
7774
- **Files -> Open Files**
78-
> Select the data directory
75+
> Select the data directory.
7976

80-
- **Use the built-in file explorer** to navigate to your project folder
77+
- **Use the built-in file explorer** to navigate to your project folder.
8178
> Expected Project structure:
8279
```
8380
data/
@@ -89,15 +86,17 @@ This project uses the following major libraries:
8986
└── ObjRep_Module_<your_module>_Test.xlsx
9087
```
9188

92-
9389
- **Files -> Open File**
94-
> Open an existing TestSuit/ObjectRepository (`.xlsx`) combo
90+
> Open an existing TestSuit/ObjectRepository (`.xlsx`) combo.
9591

9692
- **Files -> New File**
97-
> Create New TestSuit/ObjectRepository (`.xlsx`) combo with preset
93+
> Create New TestSuit/ObjectRepository (`.xlsx`) combo with preset.
9894

9995
- Start editing with the intuitive spreadsheet interface
100-
- Use the multi-tab feature to work on multiple test files simultaneously
96+
- Use the multi-tab feature to work on multiple test files simultaneously.
97+
98+
- **Edit -> Generate Test Cases**
99+
> Generate steps performed and expected result based on the command, object and value.
101100

102101
## Contributing
103102
We welcome contributions! Please feel free to submit pull requests, report bugs, or suggest new features.

core/command_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class CommandManager(QObject):
66

77
def __init__(self):
88
super().__init__()
9-
self.commands = sorted(list(COMMANDS.keys()))
9+
self.commands = sorted(list(COMMANDS))
1010
self.commandsReloaded.emit(self.commands)
1111

1212
def get_command_names(self):

core/commands.py

Lines changed: 170 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -1,151 +1,171 @@
1+
# commands.py - SIMPLIFIED VERSION
12
COMMANDS = {
2-
"StartAppWithLogin": {},
3-
"StartScenario": {},
4-
"EndScenario": {},
5-
"StopApp": {},
6-
"FWC_SetTextBox": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
7-
"FWC_VerifyTextBoxExist": {"value1": "DATA1_COL"},
8-
"FWC_VerifyTextBoxNotExist": {"value1": "DATA1_COL"},
9-
"FWC_VerifyTextBoxVisibleInTime": {"value1": "DATA1_COL"},
10-
"FWC_ScrollViewElementTextBox": {"value1": "DATA1_COL"},
11-
"FWC_GenerateRandomAlphaNumeric": {"value1": "DATA1_COL"},
12-
"FWC_VerifyZeroNotPresent": {"value1": "DATA1_COL"},
13-
"FWC_SetDropdown": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
14-
"FWC_VerifySelectedDropdownValue": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
15-
"FWC_VerifyDropdownExist": {"value1": "DATA1_COL"},
16-
"FWC_VerifyDropdownVisibleInTime": {"value1": "DATA1_COL"},
17-
"FWC_MouseOverDropdown": {"value1": "DATA1_COL"},
18-
"FWC_ClickButton": {"value1": "DATA1_COL"},
19-
"FWC_VerifyButtonExist": {"value1": "DATA1_COL"},
20-
"FWC_VerifyButtonNotExist": {"value1": "DATA1_COL"},
21-
"FWC_VerifyButtonVisibleInTime": {"value1": "DATA1_COL"},
22-
"FWC_VerifyButtonClickableInTime": {"value1": "DATA1_COL"},
23-
"FWC_DoubleClickOnButton": {"value1": "DATA1_COL"},
24-
"FWC_ClickLink": {"value1": "DATA1_COL"},
25-
"FWC_VerifyLinkExist": {"value1": "DATA1_COL"},
26-
"FWC_VerifyLinkVisibleInTime": {"value1": "DATA1_COL"},
27-
"FWC_MouseOverLink": {"value1": "DATA1_COL"},
28-
"FWC_VerifyLinkNotExist": {"value1": "DATA1_COL"},
29-
"FWC_SetCheckBox": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
30-
"FWC_VerifyCheckBoxExist": {"value1": "DATA1_COL"},
31-
"FWC_VerifyCheckBoxStatus": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
32-
"FWC_VerifyCheckBoxVisibleInTime": {"value1": "DATA1_COL"},
33-
"FWC_VerifyCheckBoxNotExist": {"value1": "DATA1_COL"},
34-
"FWC_SetRadioButton": {"value1": "DATA1_COL"},
35-
"FWC_VerifyRadioButtonExist": {"value1": "DATA1_COL"},
36-
"FWC_VerifyRadioButtonVisibleInTime": {"value1": "DATA1_COL"},
37-
"FWC_SelectToggleButton": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
38-
"FWC_VerifyToggleButtonExist": {"value1": "DATA1_COL"},
39-
"FWC_VerifyToggleButtonNotExist": {"value1": "DATA1_COL"},
40-
"FWC_VerifyText": {"value1": "DATA1_COL"},
41-
"FWC_VerifyTextNotPresent": {"value1": "DATA1_COL"},
42-
"FWC_VerifyMultipleText": {"value1": "DATA1_COL"},
43-
"FWC_DragDropElementRectangle": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
44-
"FWC_ClickCell": {"value1": "DATA1_COL"},
45-
"FWC_SelectWindow": {"value1": "DATA1_COL"},
46-
"FWC_PageRefresh": {},
47-
"FWC_VerifyPageTitle": {"value1": "DATA1_COL"},
48-
"FWC_OpenURL": {"value1": "DATA1_COL"},
49-
"FWC_OpenNewTab": {"value1": "DATA1_COL"},
50-
"FWC_SwitchToTab": {"value1": "DATA1_COL"},
51-
"FWC_CloseTab": {},
52-
"FWC_VerifyLabelExist": {"value1": "DATA1_COL"},
53-
"FWC_WaitForSecond": {"value1": "DATA1_COL"},
54-
"FWC_RightClickOnCell": {"value1": "DATA1_COL"},
55-
"FWC_DoubleClickOnCell": {"value1": "DATA1_COL"},
56-
"FWC_RightClickOnCircle": {"value1": "DATA1_COL"},
57-
"FWC_VerifyNegativeNumber": {"value1": "DATA1_COL"},
58-
"FWC_VerifyPositiveNumber": {"value1": "DATA1_COL"},
59-
"FWC_ScrollRight": {},
60-
"FWC_ScrollDown": {},
61-
"FWC_ScrollUp": {},
62-
"FWC_RightClickOnLabel": {"value1": "DATA1_COL"},
63-
"FWC_PressEnter": {},
64-
"FWC_ScrollLeft": {},
65-
"FWC_DoubleClickOnCircle": {"value1": "DATA1_COL"},
66-
"FWC_AcceptAlert": {},
67-
"FWC_CancelAlert": {},
68-
"FWC_DragDropElement": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
69-
"FWC_VerifyLabelVisibleInTime": {"value1": "DATA1_COL"},
70-
"FWC_VerifyNeutralNumber": {"value1": "DATA1_COL"},
71-
"FWC_MultiActionsInput": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
72-
"FWC_CloseAllWidgets": {"value1": "DATA1_COL"},
73-
"FWC_VerifyBidGreenColor": {"value1": "DATA1_COL"},
74-
"FWC_ResizeWidget": {},
75-
"FWC_ScrollViewElement": {"value1": "DATA1_COL"},
76-
"FWC_CheckTitleAttribute": {"value1": "DATA1_COL"},
77-
"FWC_VerifyLabelNotExist": {"value1": "DATA1_COL"},
78-
"FWC_DragDropCellElement": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
79-
"FWC_SelectFrame": {"value1": "DATA1_COL"},
80-
"FWC_UnSelectFrame": {},
81-
"FWC_VerifyNonNegativeNumber": {"value1": "DATA1_COL"},
82-
"FWC_VerifyNumberExist": {"value1": "DATA1_COL"},
83-
"FWC_MouseOverCircle": {"value1": "DATA1_COL"},
84-
"FWC_WaitForElementClickable": {},
85-
"EC_SetTextBoxRandomText": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
86-
"EC_SetTextBoxAndTab": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
87-
"EC_SetTextBox": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
88-
"EC_VerifyTextBoxValue": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
89-
"EC_VerifyTextBoxPlaceholder": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
90-
"EC_CalculateDateFromToday": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
91-
"EC_SetEventTime": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
92-
"EC_SetPrimusTextBoxAndTab": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
93-
"EC_SetDropdownAndEnter": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
94-
"EC_SelectDropdown": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
95-
"EC_VerifyDropdownValue": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
96-
"EC_SelectbyIndexvalue": {"value1": "DATA1_COL"},
97-
"EC_VerifyDropdownValueNotExist": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
98-
"EC_VerifyToggleButtonValue": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
99-
"EC_VerifyToggleButtonAbsent": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
100-
"EC_VerifyCellData": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
101-
"EC_VerifyCellValue": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
102-
"EC_VerifyCellContainsValue": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
103-
"EC_VerifyCellcolor": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
104-
"EC_ExtractMidRRBFTable": {"value1": "DATA1_COL"},
105-
"EC_ExtractBidOfferRRBFTable": {"value1": "DATA1_COL"},
106-
"EC_EnterValuesInCorrGrid": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
107-
"EC_CalculateValuesInCorrGrid": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
108-
"EC_Login": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
109-
"EC_EnterOTPText": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
110-
"EC_OverrideSpot": {"value1": "DATA1_COL"},
111-
"EC_OverrideForward": {"value1": "DATA1_COL"},
112-
"EC_TakeScreenShot": {"value1": "DATA1_COL"},
113-
"EC_SetDeltaHedge": {"value1": "DATA1_COL"},
114-
"EC_SetPremium": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
115-
"EC_QuoteIdVerification": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
116-
"EC_VerifyTradeConfirmation": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
117-
"EC_VerifyQuoteRequest": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
118-
"EC_StoreRequestValue": {"value1": "DATA1_COL"},
119-
"EC_SelectLiquidityProvider": {"value1": "DATA1_COL"},
120-
"EC_QuoteIdInQuoteBlotters": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
121-
"EC_QuoteIdInPtt": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
122-
"EC_TradeIdComparison": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
123-
"EC_VerifyAbsolutePremium": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
124-
"EC_VerifyNegativeAbsolutePremium": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
125-
"EC_VerifyRedColor": {"value1": "DATA1_COL"},
126-
"EC_VerifySolverAbosultePremium": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
127-
"EC_LeiCodeVerifyinBlotters": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
128-
"EC_VerifyAbsPremInConfirmation": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
129-
"EC_StpReportVerify": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
130-
"EC_ReinitializeClick": {},
131-
"EC_CompareMidValues": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
132-
"EC_CompareSpreadValues": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
133-
"EC_ExtractSpreadValues": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
134-
"EC_ExtractSkewValues": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
135-
"EC_ConfigurationMode": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
136-
"EC_VerifyCompositeValues": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
137-
"EC_EnterValuesInSkew": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
138-
"EC_EnterValuesInSpread": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
139-
"EC_CalculateBidAndOffer": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
140-
"EC_SpotGridTicking": {},
141-
"EC_VerifyStrategyIdInTradeAnalytics": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
142-
"EC_VerifyDataVolCurveChangeGrid": {},
143-
"EC_VerifyHedgeRateColor": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
144-
"EC_VerifyCentryProcessesColor": {"value1": "DATA1_COL"},
145-
"EC_TradeConfirmationReportVerify": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
146-
"EC_DateVerification": {"value1": "DATA1_COL"},
147-
"EC_CompareDerivedToAggregate": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
148-
"EC_CheckButtonNotClickable": {"value1": "DATA1_COL"},
149-
"EC_CompareBidOfferPrices": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
150-
"EC_HandlePopups": {"value1": "DATA1_COL", "value2": "DATA2_COL"},
151-
}
3+
"StartAppWithLogin",
4+
"StartScenario",
5+
"EndScenario",
6+
"StopApp",
7+
"FWC_SetTextBox",
8+
"FWC_VerifyTextBoxExist",
9+
"FWC_VerifyTextBoxNotExist",
10+
"FWC_VerifyTextBoxVisibleInTime",
11+
"FWC_ScrollViewElementTextBox",
12+
"FWC_GenerateRandomAlphaNumeric",
13+
"FWC_VerifyZeroNotPresent",
14+
"FWC_SetDropdown",
15+
"FWC_VerifySelectedDropdownValue",
16+
"FWC_VerifyDropdownExist",
17+
"FWC_VerifyDropdownVisibleInTime",
18+
"FWC_MouseOverDropdown",
19+
"FWC_ClickButton",
20+
"FWC_VerifyButtonExist",
21+
"FWC_VerifyButtonNotExist",
22+
"FWC_VerifyButtonVisibleInTime",
23+
"FWC_VerifyButtonClickableInTime",
24+
"FWC_DoubleClickOnButton",
25+
"FWC_ClickLink",
26+
"FWC_VerifyLinkExist",
27+
"FWC_VerifyLinkVisibleInTime",
28+
"FWC_MouseOverLink",
29+
"FWC_VerifyLinkNotExist",
30+
"FWC_SetCheckBox",
31+
"FWC_VerifyCheckBoxExist",
32+
"FWC_VerifyCheckBoxStatus",
33+
"FWC_VerifyCheckBoxVisibleInTime",
34+
"FWC_VerifyCheckBoxNotExist",
35+
"FWC_SetRadioButton",
36+
"FWC_VerifyRadioButtonExist",
37+
"FWC_VerifyRadioButtonVisibleInTime",
38+
"FWC_SelectToggleButton",
39+
"FWC_VerifyToggleButtonExist",
40+
"FWC_VerifyToggleButtonNotExist",
41+
"FWC_VerifyText",
42+
"FWC_VerifyTextNotPresent",
43+
"FWC_VerifyMultipleText",
44+
"FWC_DragDropElementRectangle",
45+
"FWC_ClickCell",
46+
"FWC_SelectWindow",
47+
"FWC_PageRefresh",
48+
"FWC_VerifyPageTitle",
49+
"FWC_OpenURL",
50+
"FWC_OpenNewTab",
51+
"FWC_SwitchToTab",
52+
"FWC_CloseTab",
53+
"FWC_VerifyLabelExist",
54+
"FWC_WaitForSecond",
55+
"FWC_RightClickOnCell",
56+
"FWC_DoubleClickOnCell",
57+
"FWC_RightClickOnCircle",
58+
"FWC_VerifyNegativeNumber",
59+
"FWC_VerifyPositiveNumber",
60+
"FWC_ScrollRight",
61+
"FWC_ScrollDown",
62+
"FWC_ScrollUp",
63+
"FWC_RightClickOnLabel",
64+
"FWC_PressEnter",
65+
"FWC_ScrollLeft",
66+
"FWC_DoubleClickOnCircle",
67+
"FWC_AcceptAlert",
68+
"FWC_CancelAlert",
69+
"FWC_DragDropElement",
70+
"FWC_VerifyLabelVisibleInTime",
71+
"FWC_VerifyNeutralNumber",
72+
"FWC_MultiActionsInput",
73+
"FWC_CloseAllWidgets",
74+
"FWC_VerifyBidGreenColor",
75+
"FWC_ResizeWidget",
76+
"FWC_ScrollViewElement",
77+
"FWC_CheckTitleAttribute",
78+
"FWC_VerifyLabelNotExist",
79+
"FWC_DragDropCellElement",
80+
"FWC_SelectFrame",
81+
"FWC_UnSelectFrame",
82+
"FWC_VerifyNonNegativeNumber",
83+
"FWC_VerifyNumberExist",
84+
"FWC_MouseOverCircle",
85+
"FWC_WaitForElementClickable",
86+
"FWC_VerifyButtonText",
87+
"FWC_GetElementText",
88+
"FWC_VerifyBulkData",
89+
"FWC_SettlePricingScreen",
90+
"FWC_WaitForElementToBeInteractable",
91+
"FWC_MouseOverButton",
92+
"EC_SetTextBoxRandomText",
93+
"EC_SetTextBoxAndTab",
94+
"EC_SetTextBox",
95+
"EC_VerifyTextBoxValue",
96+
"EC_VerifyTextBoxPlaceholder",
97+
"EC_CalculateDateFromToday",
98+
"EC_SetEventTime",
99+
"EC_SetPrimusTextBoxAndTab",
100+
"EC_SetDropdownAndEnter",
101+
"EC_SelectDropdown",
102+
"EC_VerifyDropdownValue",
103+
"EC_SelectbyIndexvalue",
104+
"EC_VerifyDropdownValueNotExist",
105+
"EC_VerifyToggleButtonValue",
106+
"EC_VerifyToggleButtonAbsent",
107+
"EC_VerifyCellData",
108+
"EC_VerifyCellValue",
109+
"EC_VerifyCellContainsValue",
110+
"EC_VerifyCellcolor",
111+
"EC_ExtractMidRRBFTable",
112+
"EC_ExtractBidOfferRRBFTable",
113+
"EC_EnterValuesInCorrGrid",
114+
"EC_CalculateValuesInCorrGrid",
115+
"EC_Login",
116+
"EC_EnterOTPText",
117+
"EC_OverrideSpot",
118+
"EC_OverrideForward",
119+
"EC_TakeScreenShot",
120+
"EC_SetDeltaHedge",
121+
"EC_SetPremium",
122+
"EC_QuoteIdVerification",
123+
"EC_VerifyTradeConfirmation",
124+
"EC_VerifyQuoteRequest",
125+
"EC_StoreRequestValue",
126+
"EC_SelectLiquidityProvider",
127+
"EC_QuoteIdInQuoteBlotters",
128+
"EC_QuoteIdInPtt",
129+
"EC_TradeIdComparison",
130+
"EC_VerifyAbsolutePremium",
131+
"EC_VerifyNegativeAbsolutePremium",
132+
"EC_VerifyRedColor",
133+
"EC_VerifySolverAbosultePremium",
134+
"EC_LeiCodeVerifyinBlotters",
135+
"EC_VerifyAbsPremInConfirmation",
136+
"EC_StpReportVerify",
137+
"EC_ReinitializeClick",
138+
"EC_CompareMidValues",
139+
"EC_CompareSpreadValues",
140+
"EC_ExtractSpreadValues",
141+
"EC_ExtractSkewValues",
142+
"EC_ConfigurationMode",
143+
"EC_VerifyCompositeValues",
144+
"EC_EnterValuesInSkew",
145+
"EC_EnterValuesInSpread",
146+
"EC_CalculateBidAndOffer",
147+
"EC_SpotGridTicking",
148+
"EC_VerifyStrategyIdInTradeAnalytics",
149+
"EC_VerifyDataVolCurveChangeGrid",
150+
"EC_VerifyHedgeRateColor",
151+
"EC_VerifyCentryProcessesColor",
152+
"EC_TradeConfirmationReportVerify",
153+
"EC_DateVerification",
154+
"EC_CompareDerivedToAggregate",
155+
"EC_CheckButtonNotClickable",
156+
"EC_CompareBidOfferPrices",
157+
"EC_HandlePopups",
158+
"EC_SetInvalidValuesInDropdown",
159+
"EC_SetVolTextBox",
160+
"EC_ResetBidOfferVerification",
161+
"EC_ComapareToolTipPremium",
162+
"EC_SetInvalidValuesInTextBox",
163+
"EC_VerifyLabelsMatch",
164+
"EC_VerifyAbsolutePremiumTradeConfo",
165+
"EC_SelectDate",
166+
"EC_VerifyCallPutData",
167+
"EC_VerifyForwardGridData",
168+
"EC_LastLoginVerification",
169+
"EC_DeleteExistingPage",
170+
"EC_ValidateDailyVolWeighted",
171+
}

0 commit comments

Comments
 (0)