Application developers may want to test their code with simulated responses, including errors, from an object of type PipelineServiceClient. To do so, construct an object of type PipelineServiceClient with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.
See Also
This example for how to test your application with GoogleTest. While the example showcases types from the BigQuery library, the underlying principles apply for any pair of *Client and *Connection.
Functions
virtual options()
This function is implemented using gMock's MOCK_METHOD().
Consult the gMock documentation to use this mock in your tests.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThe latest version available is 2.37.0-rc, with numerous older versions from 2.36.0 down to 2.12.0 also provided.\u003c/p\u003e\n"],["\u003cp\u003eThis page describes \u003ccode\u003eMockPipelineServiceConnection\u003c/code\u003e, a class designed for mocking \u003ccode\u003ePipelineServiceConnection\u003c/code\u003e to facilitate testing application code that uses \u003ccode\u003ePipelineServiceClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe mock class enables testing simulated responses, including errors, from a \u003ccode\u003ePipelineServiceClient\u003c/code\u003e instance within an application's test suite.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes the gMock framework, employing \u003ccode\u003eMOCK_METHOD()\u003c/code\u003e to implement functions like \u003ccode\u003eoptions()\u003c/code\u003e, \u003ccode\u003eRunPipeline()\u003c/code\u003e, and \u003ccode\u003eGetOperation()\u003c/code\u003e, allowing for configurable mock behavior in tests.\u003c/p\u003e\n"],["\u003cp\u003eThe provided information showcase the \u003ccode\u003eMockPipelineServiceConnection\u003c/code\u003e class allowing to use the google test framework, as well as demonstrating how to use the \u003ccode\u003eMOCK_METHOD()\u003c/code\u003e framework to manipulate the mock results.\u003c/p\u003e\n"]]],[],null,[]]