{"id":2602,"date":"2025-11-24T14:29:57","date_gmt":"2025-11-24T14:29:57","guid":{"rendered":"https:\/\/fintx.dev\/?p=2602"},"modified":"2025-11-24T14:35:34","modified_gmt":"2025-11-24T14:35:34","slug":"how-to-mock-grpc-services","status":"publish","type":"post","link":"https:\/\/fintx.dev\/?p=2602","title":{"rendered":"How to mock gRPC services"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"2602\" class=\"elementor elementor-2602\">\n\t\t\t\t<div class=\"elementor-element elementor-element-09665fe e-flex e-con-boxed e-con e-parent\" data-id=\"09665fe\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e9a2e22 elementor-widget elementor-widget-text-editor\" data-id=\"e9a2e22\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h2>Steps<\/h2><ol><li>Open FintX<\/li><li>From the menu click on the &#8220;mock&#8221; button.\u00a0 In the mocks panel click on &#8220;create a mock gRPC&#8221; button<br \/><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-medium wp-image-2607\" src=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/CreateMocks-248x300.png\" alt=\"\" width=\"248\" height=\"300\" srcset=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/CreateMocks-248x300.png 248w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/CreateMocks.png 392w\" sizes=\"(max-width: 248px) 100vw, 248px\" \/><\/li><li>\u00a0In the dialog, select a protobuf file or a reflection service.\u00a0 The screenshot below shows a protobuf selection.<br \/><a href=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/AddMockGrpcDialog.png\"><img decoding=\"async\" class=\"alignnone wp-image-2608 size-medium\" src=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/AddMockGrpcDialog-300x262.png\" alt=\"\" width=\"300\" height=\"262\" srcset=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/AddMockGrpcDialog-300x262.png 300w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/AddMockGrpcDialog.png 706w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>Configure the server as needed.\u00a0 You can choose default transport (http) or set as Named Pipes or Unix domain Endpoint<\/li><li>Click Okay.\u00a0 FintX will generate the server code, compile it and once it&#8217;s all completed the mocked gRPC service will be displayed in the explorer panel<p><a href=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/mockGrpcExplorer.png\"><img decoding=\"async\" class=\"aligncenter wp-image-2609 size-large\" src=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/mockGrpcExplorer-1024x523.png\" alt=\"\" width=\"1024\" height=\"523\" srcset=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/mockGrpcExplorer-1024x523.png 1024w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/mockGrpcExplorer-300x153.png 300w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/mockGrpcExplorer-768x392.png 768w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/mockGrpcExplorer-1536x784.png 1536w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/mockGrpcExplorer.png 1911w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p><\/li><li>Click on the &#8220;Play&#8221; button to start the server. The logs will show that the server has started<a href=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/startedGrpcMock.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-2613 size-large\" src=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/startedGrpcMock-1024x525.png\" alt=\"\" width=\"1024\" height=\"525\" srcset=\"https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/startedGrpcMock-1024x525.png 1024w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/startedGrpcMock-300x154.png 300w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/startedGrpcMock-768x393.png 768w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/startedGrpcMock-1536x787.png 1536w, https:\/\/fintx.dev\/wp-content\/uploads\/2025\/11\/startedGrpcMock.png 1913w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><p>In the next post, we&#8217;ll see how to customize the response of the gRPC method<\/p><\/li><\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Steps Open FintX From the menu click on the &#8220;mock&#8221; button.\u00a0 In the mocks panel click on &#8220;create a mock gRPC&#8221; button \u00a0In the dialog, select a protobuf file or a reflection service.\u00a0 The screenshot below shows a protobuf selection.Configure the server as needed.\u00a0 You can choose default transport (http) or set as Named Pipes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[46],"tags":[],"class_list":["post-2602","post","type-post","status-publish","format-standard","hentry","category-grpc-mocks"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/fintx.dev\/index.php?rest_route=\/wp\/v2\/posts\/2602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fintx.dev\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fintx.dev\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fintx.dev\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fintx.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2602"}],"version-history":[{"count":5,"href":"https:\/\/fintx.dev\/index.php?rest_route=\/wp\/v2\/posts\/2602\/revisions"}],"predecessor-version":[{"id":2623,"href":"https:\/\/fintx.dev\/index.php?rest_route=\/wp\/v2\/posts\/2602\/revisions\/2623"}],"wp:attachment":[{"href":"https:\/\/fintx.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fintx.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fintx.dev\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}