ARMmbed / sockets

mbed sockets library abstraction layer
Other
6 stars 18 forks source link

Porting tests to new utest-greentea framework #62

Closed mazimkhan closed 8 years ago

mazimkhan commented 8 years ago

Following tests are ported to new utest-greentea framework. Also necessary changes have be done in the test code for tests to work and for clean tear down.

sockets-test-echo-tcp-client
sockets-test-echo-udp-client

For details on new utest - greentea framework please see description in PR https://github.com/ARMmbed/greentea/pull/78

mazimkhan commented 8 years ago

@bremoran @niklas-arm @PrzemekWirkus @0xc0170 @stegut01 Please review this PR. It is port for new utest-greentea framework. There might be some understanding gaps on socket and utest API. Guidance and documentation would be much appreciated.

mazimkhan commented 8 years ago

CI build failing for error

error: mbed-drivers does not meet specification ~0.12.0 required by core-util
niklarm commented 8 years ago

I might be mistaken, but isn't TCP and UDP client already part of socket-test? They are implemented from scratch, but they test the same thing

I did take the tests in this repo as a basis for the new tests, but with utest expressing the statefulness of these tests can be achieved much better without classes.

0xc0170 commented 8 years ago

@niklas-arm Yes, I asked Przemek the same question. I was told that all these public tests which are part of our modules will be updated to use the new greentea client, deprecate to use test_env. Plus, those tests you references, are not public yet. Przemek might add more details.

mazimkhan commented 8 years ago

@niklas-arm if tests were moved to socket-test then as part of the move they should have been deleted from this repo. So that nobody wastes time in fixing or running them. Please remove these tests from this repo if not needed here now.

Anyway other purpose of updating these tests is to gain understanding of utest. You can atleast review from the perspective of utest usage.

niklarm commented 8 years ago

@niklas-arm if tests were moved to socket-test then as part of the move they should have been deleted from this repo. So that nobody wastes time in fixing or running them. Please remove these tests from this repo if not needed here now.

The tests weren't "moved", we just didn't make the new ones public, and we didn't update these. Let's not remove these rewritten tests now, since they are slightly different from the HTTP request and Time Protocol test, which do not use local servers. So let's keep these tests, especially as an example for how to use new host test mechanism (which look great btw!).

Anyway other purpose of updating these tests is to gain understanding of utest. You can atleast review from the perspective of utest usage.

I would have liked to have a more granular test cases, instead of one big class, similar to how socket-tests work, but if it works this way, it's fine too.

mazimkhan commented 8 years ago

Good to know that the effort isn't wasted. We can surely have granular tests in socket-test/test. @bremoran if you are happy with the change can you please merge it.

bremoran commented 8 years ago

A couple of minor comments. updating the dependency to mbed-drivers ~0.12.0 will fix the CI build error.

mazimkhan commented 8 years ago

@bremoran review comments incorporated.