-
Notifications
You must be signed in to change notification settings - Fork 12
New 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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use mocks for testing. #27
Comments
For the desktop OS's, GMock is already available and should probably be used. For IoT/PlatformIO, The AUnit library supports mocks but (ideally) a GMock adapter would need to be written to support a single unit test code base between desktop and IoT, just like we do for GTest. This GMock adapter (if successful) should be contributed back to AUnit just like the GTest adapter has. |
Another approach to this would be to use GTest/GMock on IoT and drop usage of AUnit. googletest has just merged my PR to add PIO support. The next step is to add the library into the PIO library manager. I have plans to get this going. Once done we should be able to use GTest/GMock for IoT. |
This is being held up by this: |
There is not PIO support for the mocks yet. That is in work. Initial support has been added to google test and I am now working through library manager issues. I would like to leave this open for tracking until that support is in place. |
@ciband Any progress on this? |
Change was finally approved and merged into GTest late last week. Next task is for me to check to see if updated have been published to PIO and then retest and iterate. |
Once #66 is merged, the next step is to add support for ESP8266. Once ESP8266 is supported, this issue can be closed. |
Is your feature request related to a problem? Please describe.
The current Cpp-Client tests use calls to actual nodes.
This ties the success of tests to the connected nodes state;
the aim should be to test the Cpp-Client's code independently.
Describe the solution you'd like
Use mock tests instead of sending requests to external nodes.
The text was updated successfully, but these errors were encountered: