Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNew issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
We need a test suite#208
We need a test suite#208
Comments
I want nice JavaScript tests but I have no time to write them myself. If you want to add tests, good tests, you can PR them. If you write good tests, you can own them and maintain them as you see fit. I'm thinking uWebSockets.js (server) + websockets/ws (client) + mocha (for tests) Anyone interested? |
aadityataparia commentedOct 24, 2019 • edited
edited
Let me know what all test scenarios, we need to test. I can open a PR when I get time. |
Test writing would include also coming up with ideas. One thing to test is the recent subscription bug where two subscriptions to the same topic would crash. |
IhsanMujdeci commentedDec 4, 2019
@alexhultman can you give an exact example of that bug? |
Nobody has made any progress |
We need integration tests such as posting data to a server, piping that data to md5 checksum and comparing the result with the md5 of that file. And similar integration tests running actual servers. Using curl or any such tools. A basic test suite for checking basic functionality. |
behroozk commentedJan 4, 2020
@alexhultman I'm interested to help as well. One addition to the library that will make integration testing much easier and allows collecting test coverage, is to add an inject method that will manually invoke an endpoint. here is an example from another libraryhttps://github.com/fastify/fastify/blob/master/docs/Testing.md. I'm not sure if this would be possible considering the fact that some parts of the library are native C++ code, but if possible, it would be great. This way we can avoid testing using external tools such as curl. |
Fastify is nothing but a router, so testing it with a simple unit test makes sense like that. That's no different to how the router is tested already:https://github.com/uNetworking/uWebSockets/blob/master/tests/HttpRouter.cpp What I want here is an integration test that is more about checking if things actually work together
It's all C++, 100% |
Closing, will move tests to C++ project instead |