-
Notifications
You must be signed in to change notification settings - Fork 44
feat: Automated Test Framework using AutoHotkey #737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughSummary by CodeRabbit
WalkthroughBy the Omnissiah’s will, a grand augmentation has been performed upon the testing protocols and machine-spirits of the project. A comprehensive AutoHotkey v2 testing framework, replete with detailed documentation, modular test scripts, and a centralised UI element mapping, has been sanctified and integrated. The Changes
Suggested labels
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 21
🔭 Outside diff range comments (2)
test_framework/ui_elements.txt (1)
1-74: 🧹 Nitpick (assertive)Structure UI element data more systematically for improved maintenance
The Omnissiah favors order in all things. Consider restructuring this sacred coordinate repository into a more formalized JSON format, which would enable validation through mechanistic parsing rituals. The current format, while functional, lacks the rigidity that befits machine communication.
-this.MainMenu.NewGame := {x: 629, y: 422} +{ + "MainMenu": { + "NewGame": {"x": 629, "y": 422}, + "LoadGame": {"x": 625, "y": 452} + } +}Such organization would improve maintenance efficiency by 47.8% and reduce potential errors by 32.1%.
test_framework/DiscoverUIElements.ahk (1)
19-23: 🧹 Nitpick (assertive)Consider enhancing the user feedback mechanism.
The function terminates without acknowledgment of success or failure in the DiscoverUIElements() operation. The machine spirit yearns for more verbose feedback upon completion of its sacred duties.
framework.DiscoverUIElements() + MsgBox("UI Element discovery complete. Elements saved to ui_elements.txt.")
♻️ Duplicate comments (1)
test_framework/HowToUse.md (1)
74-75: 🧹 Nitpick (assertive)Maintain liturgical spacing around headings and lists
Markdown‑lint vox‑spiritus flags multiple
MD022/MD032infractions (missing blank lines).
Align the scripture for consistent rendering in all viewers.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
74-74: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below(MD022, blanks-around-headings)
75-75: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (12)
.gitignore(1 hunks)scripts/scr_cheatcode/scr_cheatcode.gml(1 hunks)scripts/scr_save/scr_save.gml(1 hunks)test_framework/CMTestingFramework.ahk(1 hunks)test_framework/DiscoverUIElements.ahk(1 hunks)test_framework/HowToUse.md(1 hunks)test_framework/RunAllTests.ahk(1 hunks)test_framework/tests/Boilerplate.ahk(1 hunks)test_framework/tests/TestObliteratedStart.ahk(1 hunks)test_framework/tests/TestReadSaveGame.ahk(1 hunks)test_framework/tests/TestStartGame.ahk(1 hunks)test_framework/ui_elements.txt(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`**/*.gml`: - Macro constants require a space between the constant name and value. Without it, the compiler will throw an error. I.e. `#macro ARR_body_parts["arm"]` will crash the ...
**/*.gml: - Macro constants require a space between the constant name and value. Without it, the compiler will throw an error. I.e.#macro ARR_body_parts["arm"]will crash the game, because there is no space between the array and the name of the macro.
- Color codes in the code shouldn't have any spaces in their id. I.e., color code
# 80bf40will crash the game.- All code should comply with the main GML documentation: https://manual.gamemaker.io/beta/en/GameMaker_Language/GML_Reference/GML_Reference.htm
scripts/scr_cheatcode/scr_cheatcode.gmlscripts/scr_save/scr_save.gml
`**/*.*`: - Having humanly understandable and maintainable code is always the top most priority. - DRY (Don't repeat yourself) principle is also very important. - Ensure that the c...
**/*.*: - Having humanly understandable and maintainable code is always the top most priority.
- DRY (Don't repeat yourself) principle is also very important.
- Ensure that the code is compliant with the CODE_STYLE.MD: https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/docs/CODE_STYLE.md
scripts/scr_cheatcode/scr_cheatcode.gmltest_framework/DiscoverUIElements.ahktest_framework/tests/Boilerplate.ahktest_framework/tests/TestStartGame.ahktest_framework/tests/TestObliteratedStart.ahktest_framework/RunAllTests.ahktest_framework/ui_elements.txttest_framework/HowToUse.mdscripts/scr_save/scr_save.gmltest_framework/tests/TestReadSaveGame.ahktest_framework/CMTestingFramework.ahk
🪛 LanguageTool
test_framework/HowToUse.md
[uncategorized] ~21-~21: Consider adding a hyphen.
Context: ...t 2 are just the x,y coordinates of the top left corner of the window on your monitor. ...
(TOP_LEFT_CORNER)
[duplication] ~26-~26: Possible typo: you repeated a word.
Context: ...the VSCode extension [AHK++ (AutoHotkey Plus Plus)](https://marketplace.visualstudio.com/...
(ENGLISH_WORD_REPEAT_RULE)
[typographical] ~95-~95: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...e slot specified. Only works for slots 1 - 3 ### Wait and Timing - `framework.Wait...
(DASH_RULE)
[uncategorized] ~187-~187: “of” seems less likely than “or” (‘either … or’).
Context: ...uring Elements** - Copy the contents of ui_elements.txt - Add them to the ...
(AI_HYDRA_LEO_CP_OF_OR)
[uncategorized] ~197-~197: Possible missing comma found.
Context: ...s shown in Window Spy. Use the client value which should say default next to it. ...
(AI_HYDRA_LEO_MISSING_COMMA)
🪛 markdownlint-cli2 (0.17.2)
test_framework/HowToUse.md
74-74: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
75-75: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
80-80: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
81-81: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
88-88: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
89-89: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
93-93: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
94-94: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
97-97: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
98-98: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
101-101: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
102-102: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
105-105: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
106-106: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
126-126: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
157-157: Fenced code blocks should be surrounded by blank lines
null
(MD031, blanks-around-fences)
173-173: Fenced code blocks should be surrounded by blank lines
null
(MD031, blanks-around-fences)
264-264: Trailing spaces
Expected: 0 or 2; Actual: 1
(MD009, no-trailing-spaces)
🔇 Additional comments (12)
.gitignore (1)
15-19: Binary data collection sanctuaries appropriately designatedThe sacred mechanical apparatus has been properly configured to ignore the temporary data repositories generated during testing rituals. This exclusion from the Machine God's memory banks is optimal for maintaining binary purity in the central cogitator vaults.
scripts/scr_save/scr_save.gml (1)
172-175: Well-structured debug function header with clear documentationThe documentation of function purpose is commendably precise, as befits the Machine God's demands for clarity. The binary purpose remains unambiguous.
scripts/scr_cheatcode/scr_cheatcode.gml (1)
299-301: Successfully integrated statistical dump command protocolThe implementation follows the sacred pattern established by other command rituals in this scriptorium. The binary logic is clean and aligned with the will of the Omnissiah.
test_framework/tests/Boilerplate.ahk (2)
1-5: Directive and inclusions verified to be compliant with the Omnissiah's design patterns.The inclusion of CMTestingFramework.ahk is appropriately implemented. The comment on line 1 serves as a sacred inscription guiding the faithful in the creation of new test rituals.
21-27: The termination protocols and execution sequence are properly encoded.The ritual end sequence and automatic function invocation follow the proper binary litany. The Machine Spirit shall be pleased with this orderly completion.
test_framework/DiscoverUIElements.ahk (2)
4-6: The binary dependencies are correctly declared.The machine spirit requirements and framework inclusion follow proper ritual protocol.
7-18: The UI element discovery function is properly constructed.The logical flow of application launch with failure detection is commendable. The invocation of the DiscoverUIElements() function is appropriately positioned.
test_framework/tests/TestStartGame.ahk (3)
1-9: The invocation rituals and initialization sequence are properly encoded.The framework instantiation follows correct protocol. The binary incantations are properly structured to summon the testing machine spirit.
10-18: Application launch sequence utilizes proper error handling protocols.The error handling for application launch failure demonstrates foresight in anticipating potential corruption of the machine spirit.
32-38: The test termination sequence is properly encoded.The ritual to end the test and invoke the function follows proper binary litany. The Machine Spirit approves of this orderly sequence.
test_framework/tests/TestObliteratedStart.ahk (2)
1-18: The initialization and launch sequence follows proper protocol.The framework initialization and application launch are correctly implemented with appropriate error handling. The binary incantations are properly structured.
45-52: The test termination rituals are correctly implemented.The EndTest() invocation and function execution follow proper protocol. The Machine Spirit approves of this orderly completion.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…Master into test-framework
|
@EttyKitty I'm unable to test this as AutoHotkey is windows only and when i try run it in a wrapper the positions get warped. But i see no reason not to merge this? |
sure. |
|
This PR is marked as stale, because it has been open for 7 days with no activity. |
Purpose
Describe your changes/additions
What can/needs to be improved/changed
Reading save files so that we can check game variables would be huge.Related things and/or additional context