GithubHelp home page GithubHelp logo

trowel's Introduction

Trowel

Build Status

Trowel is a tiny service for looking up the Java glue code for Cucumber steps. It scans a directory hierarchy containing Java glue and reports the location of the glue defining a particular step.

Trowel listens on a port for HTTP POSTs containing JSON lookup requests, and replies in JSON with the glue location.

An example interaction:

Client sends:

{"action":"lookup","stepText":"the cat is on the ROOF"}

Trowel responds:

{"matches":[{"file":"./testing-ground/Glue.java","lineNumber":7}]}

To Do

  • Caching. Trowel should not re-scan the whole hierarchy every time.

  • Invalidate-cache request, to force a re-scan of the glue hierarchy.

  • Handle keywords properly. Trowel should be able to identify and strip away the keyword from the step text. Currently the Elisp has absorbed this.

  • Code coverage from Clojure tests.

  • Use proper testing suite for the Clojure tests.

  • Integrate the Gradle and Clojure builds so that it's not necessary to manually gradle installDist before running Clojure tests.

  • Support requests which contain the whole Scenario, Scenario Outline or maybe even the whole file, to address GH-2. Could use the real Gherkin parser for this too.

  • Need to be able to send a glue root argument so the same instance of Trowel can be used on different projects simultaneously.

trowel's People

Contributors

maccoda avatar scolej avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

trowel's Issues

Do something about angle brackets in steps.

Scenario outlines use angle brackets for substituting values. This is going to be tricky to handle properly. The angle brackets break regex matching.

Options:

  1. Strip out the angle brackets completely, leaving the variable name.
  2. Strip out the angle brackets and everything inside them, leaving nothing.
  3. Try a few different replacements (numbers, letters) to try and get a match,
  4. Fully parse the scenario outline and make the actual replacement before attempting matching.

How well the simple options works depends on how stringent the glue regex is. Number 1 is probably the best first bet.

Annotation regex is broken.

Need to include trailing and leading whitspace. Should have used an actual Java file to test. Would have caught this one.

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.