Comments (14)
Interesting, I'll have a look into this. This should be resolved as part of the shared-behaviours in point 5 though :)
from openactive-test-suite.
@ylt note that I've expanded the above with some additional ideas, and also to include booking more than one event. To make this work within the existing framework, how about:
Within the templates could we repeat the OrderItems within the OrderItems (e.g. see below)? Then pass these through all the way from e.g. an array specified here?
For example
"orderedItem": [
{{#each orderItem}}
{
"@type": "OrderItem",
"position": {{& position}},
"acceptedOffer": {
"@type": "Offer",
"@id": "{{& offerId}}"
},
"orderedItem": {
"@type": "ScheduledSession",
"@id": "{{& opportunityId}}"
}
}
{{/each}}
],
I've also added to getRandomEvent
notes in the example above
What do you think?
from openactive-test-suite.
Using an approach like this should be much easier than using Mustache: #37
from openactive-test-suite.
Great plan!
from openactive-test-suite.
@ylt just to note that C1 validation doesn't seem to be running in the master branch
from openactive-test-suite.
Sure no rush if more efficient to do as part of point 5 :)
from openactive-test-suite.
Include validation on the output of C1 with the correct validation mode (and if status code is not 200 then use "OpenBookingError" validation mode)
Although we did say that validation would be included in flow.C1()
- so assume that it should in fact be part of that?
from openactive-test-suite.
Seems to be running fine in #38 :)
from openactive-test-suite.
That error handling is implemented in #36
Didn't quite include it into flow.C1(), but have wrapped it up into it's own helper. Logic itself needs to be running outside of a block.
from openactive-test-suite.
Actually finding much of these fairly complicated to implement. The flow component is only designed to deal with singular bits of info and it's hard to figure out how to adapt it to work with multiple in a nice way.
I'm thinking that the best way of defining this may be to come up with some test cases that would require these, then see how a solution naturally evolves as it's being developed.
from openactive-test-suite.
@ylt funny I was just about to post in here...
C1 is still not validating in master
And if you try pointing it at https://everyoneactivebookingfacade-test.azurewebsites.net/, then many of the endpoints don't validate
Perhaps there's some kind of race condition or similar happening here?
from openactive-test-suite.
note you'll need to turn random on to use the endpoint above
from openactive-test-suite.
So I was using this to test an implementation tonight, but the tests were getting in the way so ended up moving this issue forward for you - hope this is helpful!
So now I've got the random opportunity part of this working at a basic level (single OrderItem), in commit ec96f67. See test/flows/book-only/
for my attempt at this.
This is the specific file: ec96f67#diff-121446740cc34c991fa12b7383997ee6
I think I've also might have identified the cause of one of the "race conditions". It looks like the flows are lacking some defensive programming for cases where a prerequisite call fails - specifically those calls that hit the microservice and wait for the feed - getMatch and getOrder. I've made a quick fix for getMatch
, but we need something similar for getOrder
.
It's also probably worth stopping all the main calls C1, C2, B etc executing if the opportunity couldn't be retrieved from the feed for some reason, as it'll just hit the booking system with loads of broken requests otherwise after the timeout (which may cause more race conditions). I've tried to do this here but haven't quite managed it: ec96f67#diff-7ec38b867eb5885e1977c92e06a66053
If you run npm test -- test/flows/book-only/
against the reference implementation on master now you'll see the issues for C1 validation - it's still not running. Very strange!
from openactive-test-suite.
Note this issue covered multiple features so has been split and closed: #40, #41, #41, #42, #43
from openactive-test-suite.
Related Issues (20)
- Have Test-Data-Generator output which controlled mode actions are needed for a particular user
- Fix Validation Errors report generation in Broker
- Test Suite needs to run Reference Impementation in CI mode
- Add RPDE tracing to help debug common errors in RPDE implementation
- Broker: Implement Order Feed Validation to improve Broker --validate-only mode
- Elaborate on or implement all TODOs in Test Suite HOT 1
- Broker: Categorise and document different opportunity cache strategies
- Broker: Consolidate opportunityItemRowCache and opportunityCache to reduce memory usage & simplify code
- `book-and-seller-replace-items` test should assert that capacity changes as expected after a replacement
- Create unit tests for user-facing Broker Microservice APIs that are not tested by test suite HOT 1
- Document generating a certificate from OpenActive Test Suite
- Fix Test Interface Criteria generated TS types
- Broker Microservice: Unit test the `/validation-errors` endpoint
- Merge docker test suite work to master, once README is updated to document use of docker
- Consider running full Test Suite before push to Docker
- Create (and document) GitHub Action to integrate with Docker image HOT 1
- "Show All Errors" button doesn't work in Test Suite results summary.html HOT 1
- Improve missing opportunity data errors to include specific numbers
- Update README for Running with Docker
- Place consistency
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 openactive-test-suite.