Code Monkey home page Code Monkey logo

tegere's People

Contributors

jrwdunham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tegere's Issues

Address the speed of command-line usage ... somehow

It would be nice to be able to run a testing system built on TeGere from the command-line with faster feedback. Of course, in Clojure we can execute Gherkin features from the REPL. However, consider the case where you want to test that the CLI for your TeGere system works correctly because you are going to run it in a CI workflow. It's not nice to wait 5-10 seconds between running clj -m vbit.core --tags=... and seeing output.

Options:

  • Convert the code to CLJC and use the NodeJS runtime to execute features from the command line.
  • Get a TeGere-based system working with GraalVM. I have put some effort into this and so far have failed. Using spec.alpha in a Clojure app seems to break Graal native-image compilation.
  • Make TeGere runnable using Babashka? Is this even possible given its dependencies?

Problem: cannot have comments between step lines

You should be able to write scenarios like the following, but currently you cannot:

  Given a monkey
  #When I give him a banana
  Then he is happy
  But he doesn't eat it
  And he looks at me quizzically

Add `Background` parsing

I'm finding your parser very useful, thank you. There is a thing I'll want to add, and that is the ability to read Background sections. If you have advice -- I've written a modest amount of Clojure, but I've read very little -- let me know and I will try and submit code.

Problem: step data is not implemented

It should be possible to add tabular (or freeform string) data to arbitrary Gherkin steps. This feature reduces the probability of ad hoc hidden configuration in the Clojure step logic and/or repeated values in a Scenario Outline Examples table.

Problem: tying step text to semantics is tedious—use NLP!

It is tedious to have to manually connect each step text/definition, e.g., "Given app has a resource with attribute value", to its execution semantics, e.g., (confirm-existence-of-or-create context resource :attribute value). It should be possible to devise a "step grammar" (CFG) that parses step texts (instead of using simple regular expressions) and maps them to expected function names and definitions. This could be a real "value add" to Gherkin from the Clojure/Instaparse side of things.

Problem: first step implementation match is arbitrarily chosen when there are multiple

Imagine this step:

When the button is pressed repeatedly with a 2 second delay

and these step functions:

(When "the button is pressed {method}" (fn [ctx method] ...))
(When "the button is pressed {method} with a {delay} delay" (fn [ctx method delay] ...))

Currently, both step functions have regexes that will match the step. However, the one that is chosen is arbitrary (determined by hashmap key ordering, I believe).

Some more principled method should be implemented for determining a single match. I propose, at least for the interim, that we simply choose the step with the longest regex, i.e., the second in the above example.

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.