Open egekorkan opened 4 years ago
@egekorkan still valid?
@egekorkan @relu91 is this issue still valid?
I think that it is still valid. This would actually help identify quite a bit of the bug reports I saw recently. A couple of curl requests that we maintain would be fine. Or the current HTTP tests can be extended with something on this direction? Yet another possibility would be to include this in the CLI tests or create a high-level end-to-end tests since these are not necessarily testing a single a binding but a Thing running on a servient which implies testing the core package as well.
I think the best way to integrate it is to extend HTTP tests with a fully e2e test suite.
In practice we should follow what we have done for MQTT: https://github.com/eclipse-thingweb/node-wot/tree/master/packages/binding-mqtt/test. In particular, https://github.com/eclipse-thingweb/node-wot/blob/master/packages/binding-mqtt/test/mqtt-client-subscribe-test.integration.ts
I think that for node-wot developers, it would be good to have an external test environment as well. I have created a Postman collection to test the counter example. I will improve it in the future but first I would like to have your opinions.
https://gist.github.com/egekorkan/a301f148311df69efb4c13e9e09a3989
You can simply import it and run as a Postman collection. The last one is listening to an event, for which you have to invoke one of the actions