Giter VIP home page Giter VIP logo

Comments (3)

nickebbutt avatar nickebbutt commented on May 29, 2024

We need to review handler scopes, but I'm not sure the above example should be implemented as a Handler class - probably better as an ExcecutionListener which receives lifecycle events including start() and end() for the whole session. To do this we'd need to add a hook to specify a custom ExecutionListener, which we should really do anyway.

from chorus.

yamaduc avatar yamaduc commented on May 29, 2024

I see your point.
It would be nice if there was an example on how to write a custom ExecutionListener on the Wiki :-)

from chorus.

nickebbutt avatar nickebbutt commented on May 29, 2024

Have thought about this some more and we have decided to enhance scoping for Handler classes to support a feature scope (handler gets created once per feature, reused for scenario). We will also support initialization and destroy methods which are scoped by scenario/feature, so a feature-scoped handler can do some initialization and tear down for individual scenarios as well as feature start/end.

I think the ability to configure a process to be feature scoped would be a nice idea. To support this we can change the ProcessHandler to be feature scoped, and allow a process to be configured as 'feature' or 'scenario' - if scenario then a process will be shut down when the scenario ends, otherwise at the end of the feature.

We are also adding a special 'Feature-Start:" and "Feature-End:" section to the supported syntax - these are special scenarios which perform setup and tear down for a feature and would be a good place to start any feature-scoped processes.

For processes which need to start and stay running for a whole suite of tests, an ExecutionListener would still be the best place to do this, since we won't be supporting any kind of suite scoping, at least for now. We will add the ability to specify a custom ExecutionListener class in the next release.

More on the wiki soon

from chorus.

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.