chorus-bdd / chorus Goto Github PK
View Code? Open in Web Editor NEWThe Chorus BDD interpreter - Executable specifications for distributed systems
Home Page: http://www.chorus-bdd.org
License: MIT License
The Chorus BDD interpreter - Executable specifications for distributed systems
Home Page: http://www.chorus-bdd.org
License: MIT License
Would look more polished if:
When Chorus scans the path for step macro files it is possible for it to find two maros with the same name.
Currently the implementation combines all steps in the macros producing strange tests. It would be better to make the parser report an error if an ambiguously named step macro is found.
Further, to allow the user to have different versions of the step macro; the -f flag to the parser should be able to accept multiple semi-colon separated paths (like classpath in Java) rather than just a single value. This will allow the user to specify multiple individual folders for config rather than just one.
Create an Abstract class which contains
@ChoursResource
FeatureToken ft:
ft.getName():
....
Create a new Handler which extends the Abstract class.
The FeatureToken is null
We have a case, where we need the process handler, to handle a particular situation.
For example, in the Feature-Start:
I want to check if something is running already and it wasn't started by Chorus.
I could create a handler to check if the outside process is running.
If it is running, create a new ChorusContext variable, isRunning, and set it to true.
If it's not running, create a new ChorusContext variable, isRunning, and set it to false.
Add a new step to the Process Handler to check the ChorusContext variable isRunning.
If isRunning is not null/false, then start the process.
If isRunning is true, don't start the process.
This would be useful where you have 2 situations.
E.G. 1
The developer doesn't want to start a server, wants the test framework to start the server and run all tests on their local machine.
E.G. 2
The qa setup has an external process which deploys and starts the server in a vm and qa only wants the tests to run.
Alternative to prevent having to set the system properties
It would be nice if there was integration for http://www.sonarqube.org/
It's a very useful tool for measuring overall Quality
Currently the read and read line steps support reading expected values.
There are cases where I read a line and I want to make sure an error or something isn't read.
Provide a handler to integrate with Sikuli for UI testing
Connectors is a better name for this
Leave Remoting in place for 3.x but deprecate it going forward
Prevent 3rd party libraries / logging APIs from re-routing chorus' console output by capturing the initial System.out and System.err as early as possible
I have a particular feature file I want to run as the last test.
Currently the only way to make this happen, as far as I'm aware of, is to name the feature file beginning with a 'z'.
Chorus executes the tests in Alphabetical Order.
Perhaps adding support for a tag @finaltest or give it some other name.
The system picks up this tag and executes this feature last.
I have a step macro like such:
Step-Macro: I can run the console in batch mode
Given I start a consoleBatch process named console
Then I read the line 'Command Line .' from the console process
Then I read '< . >' from the console process
Finally I write the line 'quit' to the console process
Step-Macro: I execute application
Given I start a consoleFlow process named console
And I read the line 'Command Line .*' from the console process
....
Uses: Processes
Feature: test
Run the test
Scenario: Execute the test
Given I can run the console in batch
And I execute application
It's failing stating 'console' process already exists.
As soon as step 'And I execute application' is executed.
The stepmacro 'I can run the console in batch mode'
Issues a 'quit' command which stops the process.
It might take a few seconds to stop the process, is this causing the issue?
I added the process.scope=scenario and it still failed.
I've come across times where it would be nice if we could have some conditions in the feature file and or stepmacro
I'd like to see the ability to execute a loop and if/else steps
Support an annotation which can be applied to ExecutionListener to control the order in which listeners are invoked.
Use this to guarantee the ordering in which tear down takes place for built in listeners
Create an installable tar.gz for web agent
The user might want a process to Process to run until all feature files are completed.
E.G. Launch a server, run all tests against it, stop server.
Add the ability to override scope = HandlerScope.MANAGED or scope = HandlerScope.UNMANAGED in the XXX-processes.properties.
It would save time to pick up changes to the step patterns without requiring a process restart
Should show more info when log levels are increased, including parameters overridden with system property settings
Sometimes develop wants a clean way to stop a scenario after a certain Step.
Other than creating a handler with a step System.exit(0);
Need the ability to interact with the STDIN of a process started by ProcessHandler.
Example:
Given I start a server process named myServer
And I start a console process named myConsole
And I send the line (insert your text here) to the myConsole process
It would be very useful to have
.read the line '(.)' from (?:the )?([a-zA-Z0-9-_]*) process within (\d+) seconds
.read '(.)' from (?:the )?([a-zA-Z0-9-_]*) process within (\d+) seconds
Add support for suite-start.feature and suite-end.feature
These contain some steps to run and the start and end of a test suite
Must support profiles so that different profiles can have different setup / tear down
It would be useful to have the ability to launch a Process via the RemoteHandler.
Interact with it just like the current ProcessHandler.
There's no way to know which standard steps are available
Auto generate both as interpreter output and for documentation website
It would be nice to have a way to run chorus which would wait for a key press when a scenario fails, to allow debugging within a browser etc.
Need the ability to pass values from the ChorusContext to the ProcessHandler's read and write steps.
The ChorusContext Handler might need to be modified in order support this request.
One way I can think of is allow the ChorusContextHandler to retrieve values from an existing object in the ChorusContext and pass it to a newly created ChorusContext variable. (This might not be the best idea)
E.G. MyHandler.java
ChorusContext.getContext().put("myPath", theFilePath);
feature file
Uses: Chorus Context
Uses: MyHandler
Uses: Processes
Given I can retrieve my context data from variable myPath
Then I create a context variable myVar with value from existing context variable myPath
Next I write line myVar to the xxxx process
I'd prefer something along the lines
Uses: Chorus Context
Uses: MyHandler
Uses: Processes
Given I can retrieve my context data from variable myPath
Next I write line ChrousContext.myPath to the xxxx process
Need the ability to work with the STDOUT of a process started by ProcessHandler.
Example:
Assuming we have STDIN feature added as well
Given I start a server process named myServer
And I start a console process named myConsole
And I send the line (insert your text here) to the myConsole process
Then I read the line from myServer and check if myValue exists.
At present when you export a handler from a remote component, it's necessary to restart the component when you recompile to change step patterns (the step method itself can often be modified and reloaded in debug mode, but the values of step annotations cannot be).
The goal is to enable a mode where the handler classes can be reloaded at runtime from a separate class loader, and expose a better API for adding steps dynamically
It would be useful to have some PassesWithinAnnotation for the Process Handler.
For example,
You need to execute the ping process and you want to continuously read the stdout and look for a certain value or until a value is reached, for x number of seconds .
I have the flowing Step Macros:
Step-Macro: I deploy application using name space in deployment group
When I write the line 'deploy application . in ;' to the console process
Step-Macro: I deploy application using name space in deployment group with in deployment group
When I write the line 'deploy application . in with . in ;' to the console process
I'm trying to use the second Step-Macro, it's writing the following to the process:
deploy application MyApp in deployment group node3 with MyFlow.MyApp in node2;
It should write:
deploy application MyApp.MyApp in node3 with MyApp.MyFlow in node2;
At present the protocol is Jmx RMI/IIOP
The goal is to make the remoting work using a http: based protocol so that steps can be exported and called from non-java components
If default handler is also in Uses: list this shouldn't cause duplicate step detection
I used the step
Given I stop the process named xxxx
It's not stopping the process.
ps -ef | grep java shows the process is running.
Would be better if this case resulted in step failure
[10:44:12]: [junit] ib.internal.neon.chorus.ChorusUiSuiteTest
[10:44:12]: [junit] Exception in thread "main" java.lang.NullPointerException
[10:44:12]: [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:419)
[10:44:12]: [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
[10:44:12]: [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)
[10:44:13]: [junit] Running ib.internal.neon.chorus.ChorusUiSuiteTest
I upgraded to 1.6.9 from 1.6.8 and now chorus complains it can't find my process configuration file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.