You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a number of tests already written, if we change a method name in the automaton code, it should be possible to easily modify existing tests with the new methods. It should also retain the existing parameters in the tests.
There is a replace feature already available in FitNesse, we can enhance it to replace method like below.
The text was updated successfully, but these errors were encountered:
This would be a very cool feature, but I believe it will be quite hard to implement. The same method may be present in multiple classes, if the test system is 'slim' the same method could be called from scripts and decision tables and scenarios might be defined with the same name as the original method.
The IntelliJ plugin tries to support something like this, but I believe it is horribly broken and I would not recommend its usage on a project of any complexity/size.
I believe using a text editor on the source files of you wiki pages and doing a regular expression based search replace, followed by careful review of all changes made is the best approach (and actually quite a good one) to deal with this situation. This is one of the reasons I like having my tests in version management and being able to run a full test suite based on a branch of my tests before I share it with the rest of the team.
Getting this to work right via the wiki, and good enough to be safe enough on a shared wiki server seems very hard to me.
Someone who want to attempt to implement this can maybe take some inspiration from the 'slim coverage' test system I developed some time ago (in https://github.com/fhoeben/hsac-fitnesse-plugin, slim coverage source). That does a 'dry run' of a test suite to determine which scenarios are used where. I believe that could be extended to find out which methods are called where, which would be valuable input to determine which places require renaming and which do not, even though that still would not tell you on which classes the methods are called.
Agreed. I raised a pull request with those comments. I think it may still be useful compared to just doing a regex replace as I gave a few examples in the screenshot in the pull request.
After a number of tests already written, if we change a method name in the automaton code, it should be possible to easily modify existing tests with the new methods. It should also retain the existing parameters in the tests.
There is a replace feature already available in FitNesse, we can enhance it to replace method like below.
The text was updated successfully, but these errors were encountered: