Files

copied
Last update 6 years 4 months by Nick
Filesteststest_webcc
..
readme.md
test_webcc.ino
readme.md

Purpose of the tests

To confirm that any of the recent modification of module WebCC (webserver infrastructure) and its components did not introduce anomalies to module's performance

Running the tests

Copy here all necessary files from main project directory. The files to be copied are as follows:

  • module.h
  • util_comm.cpp
  • util_comm.h
  • webcc.cpp
  • webcc.h

Copy here all necessary files from tests/common directory. The files to be copied are as follows:

  • fakediag.cpp
  • fakediag.h
  • fakestream.cpp
  • fakestream.h
  • test.h

Open .ino file in IDE, compile, upload and open serial monitor to observe test results

Expected test results

The following is expected in serial monitor window:

---------------- TESTING STARTED ----------------

Test function started: static void TestFakeStream::beginIninputInitexpectCorrectInputInBuffer(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::readIninputReadexpectCorrectCharsRead(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::readIninputReadUnavailableexpectUnavailable(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::writeOutprintStringexpectTheSameStringInTheOutBuffer(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::beginInOutinputInitexpectCorrectInputInBuffer(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::readInOutinputReadexpectCorrectCharsRead(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::readInOutinputReadUnavailableexpectUnavailable(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::writeInOutprintStringexpectTheSameStringInTheOutBuffer(), file fakestream.cpp PASSED Test function started: static void TestBufferedPrint::writestringShorterThanBufferexpectStringSentAfterBufferedPrintOutOfScope(), file testwebcc.ino PASSED Test function started: static void TestBufferedPrint::writestringLongerThanBufferexpectStringSentAfterBufferIsFull(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::beginvalidateInternalsexpectTrue(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::beginbeginNotCalledexpectInternalError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsenormalGetRequestWithNoFieldsexpectCorrespondingRequestParts(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsenormalGetRequestWithNoFieldsAndWithSpecialCharsexpectCorrespondingRequestParts(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsenormalGetRequestexpectCorrespondingRequestParts(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsenormalPostRequestexpectCorrespondingRequestParts(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsenormalPostRequestWithUrlQueryexpectCorrespondingRequestParts(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenMethodexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenMethodAndTrailingSpaceexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseheaderWithMethodOnlyexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseheaderWithMethodAndTrailingSpaceexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsetooLongMethodexpectPartTooLongError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseNoMethodexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseEmptyMethodexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPathexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPathAndTrailingSpaceexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseheaderWithMethodAndPathOnlyexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsetooLongPathexpectPartTooLongError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseEmptyPathWithQueryexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseEmptyPathWithoutQueryexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery1expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery2expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery3expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery4expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery5expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery6expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery7expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery8expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery1NoVersionexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery2NoVersionexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery3NoVersionexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery4NoVersionexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery5NoVersionexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery6NoVersionexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery7NoVersionexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery8NoVersionexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery1FullHeaderexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery3FullHeaderexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery5FullHeaderexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery6FullHeaderexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenURLQuery7FullHeaderexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsetooLongURLQueryNameexpectPartTooLongError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseEmptyURLQueryNameexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsetooLongURLQueryValueexpectPartTooLongError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseEmptyURLQueryValueexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenVersionexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsetooLongVersionexpectPartTooLongError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseEmptyVersionexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseheaderWithoutTrailingCRLFexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseheaderWithOneTrailingCRLFexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenFieldNameexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsefieldWithNameOnlyexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseemptyFieldNameexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsetooLongFieldNameexpectPartTooLongError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenFieldWithSeparatorexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenFieldValueexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseemptyFieldValueexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsetooLongFieldValueexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsefieldFollowedBySingleCRLFexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery1expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery2expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery3expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery4expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery5expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery6expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery7expectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery2FollowedByCRLFexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery4FollowedByCRLFexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsebrokenPOSTQuery6FollowedByCRLFexpectStructureError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsetooLongPOSTQueryNameexpectPartTooLongError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseEmptyPOSTQueryNameexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parsetooLongPOSTQueryValueexpectPartTooLongError(), file testwebcc.ino PASSED Test function started: static void TestHTTPReqParserStateMachine::parseEmptyPOSTQueryValueexpectNoError(), file testwebcc.ino PASSED Test function started: static void TestFakeDiag::logvariousParametersexpectCorrectParametersStored(), file fakediag.cpp PASSED Test function started: static void TestFakeDiag::logmultipleEntriesexpectCorrectEntriesStored(), file fakediag.cpp PASSED Test function started: static void TestFakeDiag::loginputStringExceedsMaxLengthexpectStoredStringTruncated(), file fakediag.cpp PASSED Test function started: static void TestFakeDiag::loginputTooManyStrings_expectMaxStringsPerLimit(), file fakediag.cpp PASSED

---------------- TESTING FINISHED --------------- Test functions passed: 87 Test functions failed: 0

Failed tests

The following example illustrates failed tests reporting:

Test function started: static void test(), file test.ino FAILED in line 1, file test.ino

Report a bug