0

For debugging purpose, I want to log all method calls made to the fixture code.

I've an example where I can log method calls by instrumenting the code using Javassist. But that requires me to pass "-javaagent=<> " as command line parameters, which I can not do while running the Fitnesse test from browser. I can add new package and classes but can not modify the existing fixtures. Any pointers will be appreciated. Fixture code is in Java, Fitnesse server is started from command prompt and tests are started from browser.

User_77609
  • 33
  • 1
  • 6

1 Answers1

0

When using slim you can use the 'LoggingInteraction' to have all methods invoked logged.

To enable this you can add the following line to the root/suite wiki page: !define slim.flags {-i fitnesse.slim.fixtureInteraction.LoggingInteraction}, see the minimal documentation http://fitnesse.org/FitNesse.FullReferenceGuide.UserGuide.WritingAcceptanceTests.SliM.InteractionAwareFixture

Fried Hoeben
  • 3,247
  • 16
  • 14
  • Thanks for the reply Fried. I've used the code in the above LoggingInteraction link and substituted syso statements with a method call that will write the class and method name to a file. Added the !define statement to wiki page as well. Still the method calls are not logged. Am I missing something? – User_77609 Apr 02 '17 at 07:37
  • I believe the slim.flags should be placed on same page that sets the test system to slim. Did you place it there? – Fried Hoeben Apr 02 '17 at 08:14
  • Yes. I did. Still could not get it to work. Anyways, thank you for your help. – User_77609 Apr 02 '17 at 16:39