zfisherdrums Posted June 1, 2007 Share Posted June 1, 2007 (edited) While working on an automation framework for my company, I found myself missing some of the xUnit testing capabilities that more "traditional" development environments employ. Then I remembered hearing Martin Fowler at a conference speak of the somewhat trivial task of implementing unit testing frameworks for companies he had worked for. So what follows is my attempt at providing some unit testing functions in AutoIt. It is by no means as robust as the xUnit frameworks nor is it a highly-optimized, textbook implementation - but it suited my needs at the time. Edit:TestSetup and TestTearDown functionality added. These functions are accessed using "Call()" and are not required per se. But AU3Check will kickback non-fatal errors if they are not defined in the Test Script. See the examples uploaded for further clarification.The example "CalcCore.zip" contains a minature automation framework for testing some functionality in "Calculator". The included "FunctionLibTests" and "ActionLibTests" describe the tests associated with their respective libraries. Run these to see Testing.au3 in action.Here is Testing.au3:Testing.au3After placing Testing.au3 in the include directory, download this example:CalcCore.zipCurrent Limitations:> Output File does not contain the periods and "F"'s that appear in the console.> Only 3 Assertions> Others only you know about Edited June 17, 2007 by zfisherdrums phuocvo88 1 Identify .NET controls by their design time namesLazyReader© could have read all this for you. Unit Testing for AutoItFolder WatcherWord Doc ComparisonThis here blog... Link to comment Share on other sites More sharing options...
lod3n Posted June 1, 2007 Share Posted June 1, 2007 Not bad. Well done. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
phuocvo88 Posted October 18, 2021 Share Posted October 18, 2021 Your work is pretty good, I'm trying to apply your framework for my automation testing project. However, there is still issue with the Func CloseApp inside FunctionLib.au3. None of the app instances are closed after test. Could you please help a look on this please. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 18, 2021 Developers Share Posted October 18, 2021 Don't hold your breath for an answer on a post in a 14+ years old thread. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
phuocvo88 Posted October 18, 2021 Share Posted October 18, 2021 8 minutes ago, Jos said: Don't hold your breath for an answer on a post in a 14+ years old thread. Then I should post another thread to seek for expert to help me out. thank you sir Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now