Giter Club home page Giter Club logo

tasty-ant-xml's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tasty-ant-xml's Issues

ForkIO in test and ant xml runner doesn't work

Integration test which launches a server through forkIO and then connects to it through a client and asserts a response seems to fail when used through the ant xml runner. It does work when I do not supply any ant xml runner in the declaration. The response I get when using the ant runner is connect: does not exist (Connection refused), which makes me suspect the server never started.
So, when I do
main = defaultMainWithIngredients [antXMLRunner] tests it fails, but when I run through
main = defaultMain tests it works.
Am I doing something wrong or is this an issue? I can give you more code if needs be.

Support tasty-1.5

tasty-ant-xml-1.1.8$ cabal build -c 'tasty>=1.5' --allow-newer
[1 of 1] Compiling Test.Tasty.Runners.AntXML

Test/Tasty/Runners/AntXML.hs:159:80: error: [GHC-83865]
    • Couldn't match type: Tasty.Traversal
                             (Functor.Compose
                                (Reader.ReaderT [[Char]] (State.StateT IntMap.Key IO))
                                (Const Summary))
                     with: [Tasty.Traversal
                              (Functor.Compose
                                 (Reader.ReaderT [[Char]] (State.StateT IntMap.Key IO))
                                 (Const Summary))]
      Expected: Tasty.OptionSet
                -> Tasty.TestName
                -> [Tasty.Traversal
                      (Functor.Compose
                         (Reader.ReaderT [[Char]] (State.StateT IntMap.Key IO))
                         (Const Summary))]
                -> Tasty.Traversal
                     (Functor.Compose
                        (Reader.ReaderT [[Char]] (State.StateT IntMap.Key IO))
                        (Const Summary))
        Actual: Tasty.OptionSet
                -> [Char]
                -> Tasty.Traversal
                     (Functor.Compose
                        (Reader.ReaderT [[Char]] (State.StateT IntMap.Key IO))
                        (Const Summary))
                -> Tasty.Traversal
                     (Functor.Compose
                        (Reader.ReaderT [[Char]] (State.StateT IntMap.Key IO))
                        (Const Summary))
    • In the expression: runGroup
      In a record update at fields ‘Tasty.foldSingle’, ‘Tasty.foldGroup’,
      with type constructor ‘Tasty.TreeFold’
      and data constructor ‘Tasty.TreeFold’.
      In the first argument of ‘Tasty.foldTestTree’, namely
        ‘Tasty.trivialFold
           {Tasty.foldSingle = runTest, Tasty.foldGroup = runGroup}’
    |
159 |              Tasty.trivialFold { Tasty.foldSingle = runTest, Tasty.foldGroup = runGroup }
    |                                                                                ^^^^^^^^
Error: cabal: Failed to build tasty-ant-xml-1.1.8.

directory and filepath lower bounds

#16 introduces dependencies on directory and filepath with lower bounds that preclude this package from being build with GHC < 8.0.1. Given the content of the commit that seems excessive.

Using Ant test runner prevents console output in default ingredients

If I run

main = do
  let ingredients = antXMLRunner : defaultIngredients
  defaultMainWithIngredients ingredients tests

then when tests fail, failures are recorded in the XML output (expected) but the console ingredient does not emit any output (unexpected). Is this the intended behavior? And, if so, can it be changed so that the console output is also emitted in the event of a test failure?

CC: @creswick @travitch

When there are many cabal defined test suites not all output is written to XML.

When using tasty-ant-xml in a project with multiple test suites defined in cabal the output of the last test suite is returned to the specified 'xml' file. This is because when we pass an option to the test suite the same option is passed to all cabal defined test suites.

For example, take the following repo jfdm/a-tasty-problem. If we invoke the test suite using stack as follows:

stack test --test-arguments="--xml=report.xml" 

Then only a single 'report.xml' file is generated.

Similar problems can be found with any Tasty Ingredient that asks for an option to be supplied. For example Tasty.HTML and Tasty.States I don't know if this is something that should also be reported upstream to the core tasty package as a caveat about ingredient design, after all tasty (and the ingredients) are working as 'expected'.

tasty-1.1

tasty-1.1 was released (very) recently. Should the upper bound be changed for tasty-ant-xml to allow it?

As far as I can see, there isn't anything else that needs changing.

Build error on GHC 8.4.1-alpha1

GHC 8.4.1-alpha1 was announced. Testing tasty-ant-xml with this version of GHC, I got the following error:

$ cabal install
...
[1 of 1] Compiling Test.Tasty.Runners.AntXML ( Test/Tasty/Runners/AntXML.hs, dist/build/Test/Tasty/Runners/AntXML.o )

Test/Tasty/Runners/AntXML.hs:56:10: error:
    • No instance for (Semigroup Summary)
        arising from the superclasses of an instance declaration
    • In the instance declaration for ‘Monoid Summary’
   |
56 | instance Monoid Summary where
   |          ^^^^^^^^^^^^^^
Failed to install tasty-ant-xml-1.1.1
cabal: Error: some packages failed to install:

Since the PR #22 fixes this error, could you merge it, please.

Chosing ant runner but not passing an xml option runs no tests but shows PASS

If I run tests through cabal with the ant xml runner I get this as output :

cabal test integration-tests
Preprocessing library HaskellHelloWorld-0.1.0.0...
In-place registering HaskellHelloWorld-0.1.0.0...
Preprocessing test suite 'integration-tests' for HaskellHelloWorld-0.1.0.0...
Linking dist/build/integration-tests/integration-tests ...
Running 1 test suites...
Test suite integration-tests: RUNNING...
Test suite integration-tests: PASS
Test suite logged to:
dist/test/HaskellHelloWorld-0.1.0.0-integration-tests.log
1 of 1 test suites (1 of 1 test cases) passed.

which makes it seem as if all tests have passed and you shouldn't bother anymore, but when checking the log file that has been generated it contains this:

cat dist/test/HaskellHelloWorld-0.1.0.0-integration-tests.log
Test suite integration-tests: RUNNING...
This doesn't taste right. Check your ingredients — did you forget a test reporter?
Test suite integration-tests: PASS
Test suite logged to: dist/test/HaskellHelloWorld-0.1.0.0-integration-tests.log

Is it possible to have the runner report failure to cabal?

Stackage

Are there any plans to make this package available on stackage?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.