Code Monkey home page Code Monkey logo

Comments (12)

jstolarek avatar jstolarek commented on June 16, 2024 1

Will we be merging branch https://github.com/links-lang/links/tree/js-expected-broken-tests ? This would give us a working Travis build. I admit it is not a fully satisfying solution, definitely one that does not scale easily to further extensions like conditional flags. But it will do as a temporary kludge.

from links.

jamescheney avatar jamescheney commented on June 16, 2024 1

I meant to ask about this branch on Tuesday but we ran out of time. I'd be happy with merging it.

from links.

jstolarek avatar jstolarek commented on June 16, 2024 1

Rebase probably won't be clean but that's I minor issue. I'll take care of it.

from links.

jstolarek avatar jstolarek commented on June 16, 2024

Here's a quick and dirty at fixing this ticket. For now I focused on database tests because we have one broken at the moment. The database tests are no longer picked automatically. Instead, they all need to be listed in a file tests/database/testsuite.config. Test name can be preceded with word BROKEN, which tells the run-tests script that this test is expected not work and it is OK for it to fail. Moreover, if a test marked as broken actually passes this will be reported as a failure.

Do others like this design from the perspective of someone who will be writing tests? Like I said, tests are no longer picked up automatically, they need to be explicitly "registered". Is that an acceptable price for this feature?

from links.

fehrenbach avatar fehrenbach commented on June 16, 2024

Registering tests seems okay to me.

Maybe we should discuss testing at the next meeting?

There are a number (likely growing) of switches that enable new features, like query shredding. There are tests that can only be run with some combination of features turned on (e.g. nested queries require shredding). Additionally, it would be great to rerun all the tests that didn't require (e.g.) shredding with shredding turned on anyways, to spot regressions.
With some features, some expected test results change, though. (E.g. relaxed constraints on what types are allowed in a query.)

There must be other projects with complicated testing. Can we perhaps steal their infrastructure?

from links.

jstolarek avatar jstolarek commented on June 16, 2024

Maybe we should discuss testing at the next meeting?

I won't be at the meeting on Friday - I have to go to the Jobcentre to apply for my National Insurance Number. Perhaps we could have this discussion during a lunch?

There must be other projects with complicated testing. Can we perhaps steal their infrastructure?

I already mentioned the idea of stealing GHC's test suite driver. This should definitely have all the features that we might need, including having different switches for each test, expecting tests to be broken and executing custom commands before a test is run. I spent some time looking into this and I fear that taking that driver out of GHC and adapting it to work with Links might be quite expensive. The driver relies on some Haskell code and this would have to be rewritten to OCaml.

On the other hand, I searched for various testing libraries for OCaml and didn't find anything that would offer the features needed for testing Links.

from links.

jstolarek avatar jstolarek commented on June 16, 2024

Another thing I would like to see in a test suite is some sort of summary at the end. Now I have to scan the results for failures, which is tiresome and error prone.

from links.

jstolarek avatar jstolarek commented on June 16, 2024

If anyone thinks that we should not merge this change please speak up before Monday the 24th (10 days from now). If there are no objections by that date I will merge.

from links.

jstolarek avatar jstolarek commented on June 16, 2024

Rebased my patch on top of Sam's fixes and refactored the code to eliminate repetitions. Awaiting feedback or any objections against merging.

from links.

fehrenbach avatar fehrenbach commented on June 16, 2024

Ugh. I have fixed the shredding part of the tests in the meantime, but with this change, my change is obsolete. It might even rebase cleanly?!

Anyway, looks good to me.

from links.

jstolarek avatar jstolarek commented on June 16, 2024

Merged and pushed.

I'm wondering whether to close this ticket or not. There's some useful discussion here about improving the testsuite and we might want to do this at some point in the future. I suggest to rename this issue and keep it open.

from links.

jamescheney avatar jamescheney commented on June 16, 2024

The problem named in the issue has been resolved, so I would suggest to close it and create a new issue about improving the test suite, collecting the useful discussion points there. Otherwise, no issue that generated interesting discussion would ever be closed.

from links.

Related Issues (20)

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.