kinow commented on PR #1630: URL: https://github.com/apache/jena/pull/1630#issuecomment-1321107475
>Q: Where do the tests actually invoke the java for the Fuseki server? The e2e tests actually never call a real Fuseki server. We start the [e2e](https://github.com/apache/jena/blob/7f5da174900444d9b2828f97c64ac3bd209724cf/jena-fuseki2/jena-fuseki-ui/package.json#L12) script, that runs two commands: [a fake fuseki server](https://github.com/apache/jena/blob/7f5da174900444d9b2828f97c64ac3bd209724cf/jena-fuseki2/jena-fuseki-ui/package.json#L16) and Vue's dev utils e2e script. The fake Fuseki server listens to `3030` requests by default and returns [pre-defined responses](https://github.com/apache/jena/blob/7f5da174900444d9b2828f97c64ac3bd209724cf/jena-fuseki2/jena-fuseki-ui/src/services/mock/json-server.js) for some endpoints. Vue's e2e script takes care to initialize and run the e2e tests. And some of these tests can also abstract the network layer, creating fake responses within the tests, so that the fake Fuseki server doesn't need to have a lot of `if/else` statements. e.g. https://github.com/apache/jena/blob/7f5da174900444d9b2828f97c64ac3bd209724cf/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/query.cy.js#L55-L60. I think the downside of this test design is that if the Java Fuseki endpoints change, we need to update the fake Fuseki endpoints and tests. An alternative would be to start a real Fuseki server, populate it, and run the e2e tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
