I was trying to install fitnesse and get some basic fixtures(Decision Table) going. I was faced with ”Could not invoke constructor for”. I tried a couple of solutions like,
- Setting the !Path “Location of the .class file”. I got the location of the .class file wrong. I pointed it to actual directory where .class file was, even though it was in a Java Package.
So the solution was,
!Path “Point to bin directory (Simple Java Project ) or target directory (Maven Project)”
and then create a Import table which specifies the package of the Fixture class. For example:
|import |
|com.om.example.dvr.fixtures|
This will make sure that Fitnesse can find your fixtures. I’m currently using this tutorial, which is turning out to be a wonderful Fitnesse-Slim resource.
I’m going to show my fixture properties. Might be helpful , If you are facing this error.
!contents -R2 -g -p -f -h
!define TEST_SYSTEM {slim}
!path C:\Users\ddd\JavaWorkspace\fitnesse-tutorials\my-project\bin
|import |
|com.om.example.dvr.fixtures|
!define COLLAPSE_SETUP {true}
!define COLLAPSE_TEARDOWN {true}