Skip to content

Development/covering missed tags & removing mock shell dependency#284

Open
smanes0213 wants to merge 33 commits into
masterfrom
development/Covering_Missed_Tags
Open

Development/covering missed tags & removing mock shell dependency#284
smanes0213 wants to merge 33 commits into
masterfrom
development/Covering_Missed_Tags

Conversation

@smanes0213

@smanes0213 smanes0213 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Add functional tests for the following JSON generator annotation tags, each covered with both COM-RPC and JSON-RPC tests:

@wrapped — verify method returning a wrapped counter is correctly serialised
@extract — verify list extraction flattens the wrapper in JSON
@iterator — verify iterator-based COM-RPC interface (COM-RPC only; not JSON-RPC serialisable)
@encode:mac — verify MAC address encoding/decoding round-trip
@text:keep — verify method and property names are preserved exactly as in C++
@text:legacy — verify method and parameter names are lowercased
@compliant — verify compliant JSON-RPC format is produced
@uncompliant:extended — verify extended uncompliant format is produced
@uncompliant:collapsed — verify collapsed uncompliant format is produced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the FunctionalTests suite to cover additional ProxyStub/JsonGenerator annotations (“missed tags”) by introducing new test interfaces + implementations, new COM-RPC and JSON-RPC test cases, and updating the JSON-RPC test runtime to use Thunder’s embedded PluginHost::Server (ThunderTestRuntime) instead of a stubbed IShell.

Changes:

  • Added new functional test interfaces + implementations to exercise JSON shape/naming/format and @encode:mac, plus COM-RPC-only @length:* modes.
  • Added corresponding COM-RPC and JSON-RPC gtest coverage, and new CMake options to toggle these test groups.
  • Refactored JSON-RPC server setup to initialize ThunderTestRuntime and attach to a real IShell; removed MockShell.

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
tests/FunctionalTests/README.md Updates JSON-RPC test architecture documentation to match the new runtime approach.
tests/FunctionalTests/jsonrpc/tests/TestLengthModesJsonRpc.cpp Adds JSON-RPC tests for length-modes (currently not wired into the build).
tests/FunctionalTests/jsonrpc/tests/TestJsonShapeJsonRpc.cpp Adds JSON-RPC tests for @wrapped / @extract shape behaviors.
tests/FunctionalTests/jsonrpc/tests/TestJsonFormattingJsonRpc.cpp Adds JSON-RPC tests for naming/format tags (@text:*, @compliant, @uncompliant:*).
tests/FunctionalTests/jsonrpc/tests/TestEncodingMacJsonRpc.cpp Adds JSON-RPC tests for @encode:mac.
tests/FunctionalTests/jsonrpc/MockShell.h Removes the IShell stub previously used by the JSON-RPC test server.
tests/FunctionalTests/jsonrpc/JsonRpcServer.h Switches server base class and adds ThunderTestRuntime + real IShell members.
tests/FunctionalTests/jsonrpc/JsonRpcServer.cpp Initializes ThunderTestRuntime, attaches to Controller shell, and deinitializes on teardown.
tests/FunctionalTests/jsonrpc/CMakeLists.txt Wires new JSON-RPC test sources and links test-runtime support.
tests/FunctionalTests/external/thunder/CMakeLists.txt Enables Thunder test runtime build option when JSON-RPC tests are enabled.
tests/FunctionalTests/comrpc/tests/TestLengthModes.cpp Adds COM-RPC coverage for less-common @length modes.
tests/FunctionalTests/comrpc/tests/TestJsonShape.cpp Adds COM-RPC coverage for JSON shape-related tags.
tests/FunctionalTests/comrpc/tests/TestJsonFormatting.cpp Adds COM-RPC coverage for naming/format tag interfaces.
tests/FunctionalTests/comrpc/tests/TestEncodingMac.cpp Adds COM-RPC coverage for @encode:mac round-tripping.
tests/FunctionalTests/comrpc/CMakeLists.txt Fixes option names (TEST_BUFFERS, TEST_OPTIONALS) and wires new COM-RPC tests.
tests/FunctionalTests/common/interfaces/ITestLengthModes.h Defines COM-RPC-only interface to exercise @length:1 and @length:return.
tests/FunctionalTests/common/interfaces/ITestJsonUncompliantExtended.h Defines interface tagged @uncompliant:extended.
tests/FunctionalTests/common/interfaces/ITestJsonUncompliantCollapsed.h Defines interface tagged @uncompliant:collapsed.
tests/FunctionalTests/common/interfaces/ITestJsonTextKeep.h Defines interface tagged @text:keep.
tests/FunctionalTests/common/interfaces/ITestJsonTextCase.h Defines interface tagged @text:legacy.
tests/FunctionalTests/common/interfaces/ITestJsonShape.h Defines interface for @wrapped and @extract shape behaviors.
tests/FunctionalTests/common/interfaces/ITestJsonCompliant.h Defines interface tagged @compliant.
tests/FunctionalTests/common/interfaces/ITestEncodingMac.h Defines interface to exercise @encode:mac.
tests/FunctionalTests/common/interfaces/Ids.h Adds new interface IDs for the newly introduced test interfaces.
tests/FunctionalTests/common/implementations/TestLengthModesImpl.cpp Implements ITestLengthModes.
tests/FunctionalTests/common/implementations/TestJsonUncompliantExtendedImpl.cpp Implements ITestJsonUncompliantExtended.
tests/FunctionalTests/common/implementations/TestJsonUncompliantCollapsedImpl.cpp Implements ITestJsonUncompliantCollapsed.
tests/FunctionalTests/common/implementations/TestJsonTextKeepImpl.cpp Implements ITestJsonTextKeep.
tests/FunctionalTests/common/implementations/TestJsonTextCaseImpl.cpp Implements ITestJsonTextCase.
tests/FunctionalTests/common/implementations/TestJsonShapeImpl.cpp Implements ITestJsonShape.
tests/FunctionalTests/common/implementations/TestJsonCompliantImpl.cpp Implements ITestJsonCompliant.
tests/FunctionalTests/common/implementations/TestEncodingMacImpl.cpp Implements ITestEncodingMac.
tests/FunctionalTests/common/CMakeLists.txt Registers new interfaces via AddTestInterface() for COM-RPC / JSON-RPC generation.
tests/FunctionalTests/CMakeLists.txt Adds new CMake options to enable/disable the new test groups.
.github/workflows/ProxyStubFunctionalTests.yml Installs gtest dev package and enables test runtime in CI configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/FunctionalTests/jsonrpc/CMakeLists.txt Outdated
Comment thread tests/FunctionalTests/comrpc/CMakeLists.txt Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestJsonFormattingJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestJsonFormattingJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestJsonFormattingJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestJsonShapeJsonRpc.cpp
Comment thread tests/FunctionalTests/jsonrpc/tests/TestJsonShapeJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestLengthModesJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/JsonRpcServer.cpp
Comment thread tests/FunctionalTests/common/interfaces/ITestJsonShape.h Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 42 out of 42 changed files in this pull request and generated 5 comments.

Comment thread tests/FunctionalTests/comrpc/tests/TestJsonCompliant.cpp
Comment thread tests/FunctionalTests/comrpc/tests/TestJsonUncompliantExtended.cpp
Comment thread tests/FunctionalTests/comrpc/tests/TestJsonUncompliantCollapsed.cpp
Comment thread tests/FunctionalTests/comrpc/tests/TestJsonTextKeep.cpp
Comment thread tests/FunctionalTests/comrpc/tests/TestJsonShape.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 16, 2026 08:27
smanes0213 and others added 2 commits June 16, 2026 13:57
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
smanes0213 and others added 2 commits June 16, 2026 13:57
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 42 out of 42 changed files in this pull request and generated 7 comments.

Comment thread tests/FunctionalTests/README.md Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestJsonTextKeepJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestJsonShapeJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/common/interfaces/ITestJsonShape.h
Comment thread tests/FunctionalTests/comrpc/tests/TestJsonTextKeep.cpp
Comment thread tests/FunctionalTests/comrpc/tests/TestJsonShape.cpp
Comment thread tests/FunctionalTests/comrpc/tests/TestLengthModes.cpp
Copilot AI review requested due to automatic review settings June 17, 2026 08:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 46 out of 46 changed files in this pull request and generated 6 comments.

Comment thread tests/FunctionalTests/jsonrpc/JsonRpcServer.h
Comment thread tests/FunctionalTests/jsonrpc/tests/TestStructsJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 17, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 46 out of 46 changed files in this pull request and generated 4 comments.

Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp

@bramoosterhuis bramoosterhuis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One general comment. There is a response.find(value) != string::npos pattern that repeats across most of the new JsonRpc tests (TestJsonShapeJsonRpc, TestJsonTextCaseJsonRpc, TestJsonCompliantJsonRpc, TestJsonUncompliantExtendedJsonRpc, TestJsonUncompliantCollapsedJsonRpc, TestEncodingMacJsonRpc). It's a weak assert: it only checks that the value appears somewhere in the response, so a wrapped or otherwise malformed result could still slip through. Could you go through these and replace it with an explicit EXPECT_EQ on the exact expected response where possible?

Comment thread tests/FunctionalTests/common/interfaces/ITestLengthModes.h
Comment thread tests/FunctionalTests/jsonrpc/tests/TestJsonShapeJsonRpc.cpp Outdated
Copilot AI review requested due to automatic review settings June 18, 2026 06:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 49 out of 49 changed files in this pull request and generated 8 comments.

Comment thread tests/FunctionalTests/jsonrpc/JsonRpcServer.cpp
Comment thread tests/FunctionalTests/jsonrpc/JsonRpcServer.cpp
Comment thread tests/FunctionalTests/jsonrpc/tests/TestStructsJsonRpc.cpp
Comment thread tests/FunctionalTests/CMakeLists.txt
Comment thread tests/FunctionalTests/CMakeLists.txt Outdated
Comment thread tests/FunctionalTests/common/interfaces/ITestLengthModes.h Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp Outdated
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp Outdated
Copilot AI review requested due to automatic review settings June 18, 2026 06:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 49 out of 49 changed files in this pull request and generated 2 comments.

Comment thread tests/FunctionalTests/jsonrpc/tests/TestStructsJsonRpc.cpp
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp
Copilot AI review requested due to automatic review settings June 22, 2026 05:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 48 out of 48 changed files in this pull request and generated 5 comments.

Comment thread tests/FunctionalTests/jsonrpc/tests/TestStructsJsonRpc.cpp
Comment thread tests/FunctionalTests/jsonrpc/tests/TestJsonShapeJsonRpc.cpp
Comment thread tests/FunctionalTests/common/interfaces/ITestJsonShape.h
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp
Comment thread tests/FunctionalTests/jsonrpc/tests/TestAsyncJsonRpc.cpp
Copilot AI review requested due to automatic review settings June 22, 2026 06:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 49 out of 49 changed files in this pull request and generated 3 comments.

Comment thread tests/FunctionalTests/common/CMakeLists.txt
Comment thread tests/FunctionalTests/jsonrpc/tests/TestStructsJsonRpc.cpp
Comment thread tests/FunctionalTests/jsonrpc/JsonRpcServer.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants