I'm planning on using scripting for automated UI testing. Main application is written in c#, and I want it to be scriptable, so I can do everything end-user can do, but programmatically.
I'll avoid opinion-based questions like "What do you think of software that provides an interface for scripting, like VBA macros in Excel?", or "Can this be future of all programming, big and small?" although some inside would be great.
Here goes the question:
- Which is most suitable to the purpose of building such an interface for your own application, dll-based approach or by parsing own scripting language?
Best Answer
In my optionion gui-scripting is most valuable if it is combined with a gui recorder that translates the actions of a gui-user into a replayable script.
The problematic side of gui-scripting is that if the gui changes the scripts have to be updated, too.
if for example the logindialog changes and you have 150 tests that depend on login then in the worst case you have update 150 tests.
if you are fortunate you have modularized scripts with a central method "Login" that is used by all you test-scripts so only one script needs update.
but never the less don't underestimate maintanace-costs of automated test.
if you want to gui-script html-pages there might also be problems with javascript/ajax.
Update:
writing manual test-scripts is boring but using a script recorder leads to scripts that are hard to maintain. Often it is easier to record a new test then to update an existing :-(.
What i would do to automate html application tests using free software
Note: I havenot done this solution yet but read a lot about and worked with two comercial recording products. If something is wrong with my selenium/specflow proposal please leave a comment.
If you know other free tools please update stackoverflow-s wiki most-useful-free-net-libraries