Comments (3)
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.
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.
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)
- Test Execution Enhancement Request HOT 1
- Feature Request: Add ability to pass values from ChorusContext to ProcessHandler's read and write Steps HOT 1
- Process not stopped HOT 4
- Add read/line doesn't exist Step(s) to ProcessHandler HOT 1
- Create a Step to Stop a Scenario HOT 2
- Support a language-neutral remoting protocol
- Upgrading from 1.6.8 to 1.6.9 Processes can't find configuration HOT 8
- Add support for Profiles to modify behaviour for different environments HOT 4
- Dynamic reloading of handler classes with revised step definitions
- Prevent duplicate default handler
- Capture console std/out and err streams at earliest possible opportunity
- Sikuli integration
- Logo HOT 1
- Rename Remoting handler as Connectors HOT 1
- Auto-Generate markdown and help text for for all built in handler steps HOT 1
- Ordering for execution listener callbacks
- Update docs for 3.0.x
- Add suite-start scenarios
- Installable for web agent
- Add 'wait for key press' before continuing on failed scenario switch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chorus.