hspec

Help
2012-05-15
2012-12-06
  • Graham Berks
    Graham Berks
    2012-05-15

    I see you support test-framework, I assume this means invoking a test directly without a main ??

    Any plans to support hspec ?

    Thanks

     
  • JP Moresmau
    JP Moresmau
    2012-05-15

    No, there is still a main and an executable being generated with test-framework. The support for it in EclipseFP means that EclipseFP automatically passes options to that executable, for example to generate a XML file that is used as the input of the JUnit  test result view.
    I didn't know about hspec before, so no, there was no plans for it (-:. I suppose you can either make an entry in the "Backlog" tracker on sourceforge or on my EclipseFP github repo with the enhancement request so we keep a trace of it.

     
  • neo
    neo
    2012-08-02

    How exactly do I use EclipseFP with test-framework? I created a sample test file, added an executable for it, and I can successfully run it manually. How do I create a run configuration for it? I don't see an entry in "Run as" and manually creating a run configuration with type "Test-framework test" doesn't get me anywhere. It always says  "Working directory does not exist or is invalid." when I use the project root or the specific folder where the test resides.

     
  • JP Moresmau
    JP Moresmau
    2012-08-03

    You open the cabal file editor on the cabal file of your project, and you add a test suite section, pointing to your executable test. then you can choose to run the test section, the run config will be created for you.

     
  • neo
    neo
    2012-08-03

    Ah, didn't see this. I created a test suite with "using test framework" and chose the test main. What should I do now? I don't see a new run config or any way to let it create one.

     
  • JP Moresmau
    JP Moresmau
    2012-08-03

    In project explore expand the cabal file you'll see the test stanza, you can right click run. I think running the project will prompt you for which stanza to run.

     
  • neo
    neo
    2012-08-03

    Tricky! I see my test suite and can right click "run", but then I have to select a launch configuration but the list is empty.

     
  • JP Moresmau
    JP Moresmau
    2012-08-03

    Don't know, works fine usually. Have you built your project? No errors? Do you see the test executable under the .dist-buildwrapper/dist/build/testsuitename ?

     
  • neo
    neo
    2012-08-03

    I got it working now. The problem was that there was a build error in modules belonging to a different executable. As the test code was completely independent I thought that this would be no problem.

     
  • neo
    neo
    2012-08-03

    Somewhere I read that I would now have JUnit integration, but it's still just the console. Is this already implemented?

    Also, how would I use the test type "module"?