<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Paul-Sebastian Manole</title>
    <description>The latest articles on DEV Community by Paul-Sebastian Manole (@paulsebastianmanole).</description>
    <link>https://dev.to/paulsebastianmanole</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1654141%2Fed1c2a24-992a-4a53-901b-2f6fc4b93028.jpg</url>
      <title>DEV Community: Paul-Sebastian Manole</title>
      <link>https://dev.to/paulsebastianmanole</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/paulsebastianmanole"/>
    <language>en</language>
    <item>
      <title>I Built a Better MFE Template (Because The Old One Sucked)</title>
      <dc:creator>Paul-Sebastian Manole</dc:creator>
      <pubDate>Sun, 07 Sep 2025 09:56:07 +0000</pubDate>
      <link>https://dev.to/paulsebastianmanole/modern-micro-frontend-template-and-demo-4ia4</link>
      <guid>https://dev.to/paulsebastianmanole/modern-micro-frontend-template-and-demo-4ia4</guid>
      <description>&lt;h3&gt;
  
  
  So, I've been stuck in MFE hell...
&lt;/h3&gt;

&lt;p&gt;Lately, I've been wrestling with a relic of an MFE architecture at work. We're talking Webpack—yes, &lt;strong&gt;Webpack&lt;/strong&gt;—for a brand new project. I mean, who does that anymore when you've got Webpack-compatible tools like &lt;strong&gt;Rsbuild&lt;/strong&gt; and &lt;strong&gt;Rspack&lt;/strong&gt; that don't make you want to rip your hair out?&lt;/p&gt;

&lt;p&gt;The developer experience was an absolute joke. I'm talking minutes just to see a tiny change, and HMR was so broken you couldn't even call it that. It felt like I was back in the Stone Age of &lt;code&gt;.NET Framework 4.0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To save my sanity—and maybe change the whole team's setup—I started building a demo. And from the ashes of that frustration, this clean, simple, and actually modern MFE template with Rsbuild was born.&lt;/p&gt;

&lt;p&gt;It's all on my GitHub here: &lt;strong&gt;&lt;a href="https://github.com/brokenthorn/module-federation-template-rsbuild-rspack" rel="noopener noreferrer"&gt;https://github.com/brokenthorn/module-federation-template-rsbuild-rspack&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;README&lt;/code&gt; should tell you everything you need to know, so I'm not going to bore you with the details here.&lt;/p&gt;

&lt;p&gt;Go have some fun with it. You're welcome. 😉&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>microfrontend</category>
      <category>typescript</category>
      <category>react</category>
    </item>
    <item>
      <title>Consumer-Driven Contract Testing with Pact - Code Example</title>
      <dc:creator>Paul-Sebastian Manole</dc:creator>
      <pubDate>Mon, 05 Aug 2024 01:52:24 +0000</pubDate>
      <link>https://dev.to/paulsebastianmanole/consumer-driven-contract-testing-with-pact-code-example-3ni6</link>
      <guid>https://dev.to/paulsebastianmanole/consumer-driven-contract-testing-with-pact-code-example-3ni6</guid>
      <description>&lt;p&gt;NOTE: This is a very short and super high-level example of how one might implement consumer-driven contract testing with Pact. It's meant to convey the principles and make it seem less daunting to start implementing. This continues from where I left off in my &lt;a href="https://dev.to/paulsebastianmanole/consumer-driven-contract-testing-with-pact-the-basics-4fk9"&gt;first article&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consumer-Driven Contract Testing with Pact: A Recap
&lt;/h2&gt;

&lt;p&gt;Consumer-Driven Contract Testing (CDCT) is a testing approach that ensures compatibility between services by having the consumer define the expectations for how it interacts with the provider. Pact is a popular tool for implementing CDCT, allowing you to verify that both consumer and provider are aligned in their interactions.&lt;/p&gt;

&lt;p&gt;In CDCT, the consumer application defines contracts that specify the requests it expects the provider to fulfill. These contracts are then shared with the provider, which runs verification tests to confirm it can meet the consumer's expectations. This process fosters clear and efficient communication between teams, ensuring that changes in one service don’t break another.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Pact?
&lt;/h3&gt;

&lt;p&gt;See the &lt;a href="https://dev.to/paulsebastianmanole/consumer-driven-contract-testing-with-pact-the-basics-4fk9"&gt;first article&lt;/a&gt; in the series.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Concepts in Pact
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Consumer: The application that sends requests and expects responses.&lt;/li&gt;
&lt;li&gt;Provider: The service that fulfills requests made by the consumer.&lt;/li&gt;
&lt;li&gt;Pact Contract: The agreement, defined by the consumer, specifying expected request-response pairs.&lt;/li&gt;
&lt;li&gt;Verification: The provider validates the contract, ensuring it meets consumer expectations.&lt;/li&gt;
&lt;li&gt;Pact Broker: An optional service that stores and shares contracts, making collaboration easier.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started: Code Example
&lt;/h2&gt;

&lt;p&gt;Let's implement CDCT with a simple Node.js example using Pact. First, set up your project and install Pact dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm init &lt;span class="nt"&gt;-y&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; @pact-foundation/pact @pact-foundation/pact-node jest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 1: Define the Contract in the Consumer
&lt;/h3&gt;

&lt;p&gt;Create a test file, consumer.test.js, where the consumer’s expectations are specified.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Pact&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@pact-foundation/pact&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Pact&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;consumer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ConsumerApp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ProviderService&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1234&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Pact with ProviderService&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;beforeAll&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
  &lt;span class="nf"&gt;afterAll&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;finalize&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

  &lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should receive a valid response for a specific request&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Define consumer expectations here&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addInteraction&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;provider has valid data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;uponReceiving&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a request for information&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;withRequest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GET&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;willRespondWith&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Test Data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="c1"&gt;// Trigger the request and assert results&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://localhost:1234/data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Test Data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this test, the consumer defines an expectation: when it sends a GET request to /data, it expects a 200 response with specific data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Publish the Contract
&lt;/h3&gt;

&lt;p&gt;If you’re using a Pact Broker, you can publish the generated contract to share it with the provider.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx pact publish ./pacts &lt;span class="nt"&gt;--consumer-app-version&lt;/span&gt; 1.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Provider Verification
&lt;/h3&gt;

&lt;p&gt;On the provider side, create tests that use the contract to verify compatibility. Here’s a simplified provider verification setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Verifier&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@pact-foundation/pact&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Provider Verification&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;validates contract with ConsumerApp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;opts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;providerBaseUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://localhost:8080&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Verifier&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;opts&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;verifyProvider&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This test verifies the provider against the consumer’s expectations, ensuring compatibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By using Pact, you can implement Consumer-Driven Contract Testing effectively, ensuring your services evolve in harmony. CDCT enables quick feedback on contract compliance, reduces integration errors, and fosters collaborative development between service teams.&lt;/p&gt;

</description>
      <category>contracttesting</category>
      <category>testing</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Consumer-Driven Contract Testing with Pact - The basics</title>
      <dc:creator>Paul-Sebastian Manole</dc:creator>
      <pubDate>Mon, 05 Aug 2024 01:52:05 +0000</pubDate>
      <link>https://dev.to/paulsebastianmanole/consumer-driven-contract-testing-with-pact-the-basics-4fk9</link>
      <guid>https://dev.to/paulsebastianmanole/consumer-driven-contract-testing-with-pact-the-basics-4fk9</guid>
      <description>&lt;h2&gt;
  
  
  Consumer-Driven Contract Testing with Pact: The Basics
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Contract Testing?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://martinfowler.com/bliki/ContractTest.html" rel="noopener noreferrer"&gt;Contract testing&lt;/a&gt; ensures the interactions between services adhere to shared expectations, or "contracts." Unlike traditional end-to-end tests that check complete workflows, contract testing focuses specifically on the data exchanged between a consumer and provider, reducing complexity and making it easier to identify integration issues in microservices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Consumer-Driven Contracts?
&lt;/h3&gt;

&lt;p&gt;In a Consumer-Driven Contract Testing (CDCT) approach, the consumer (like a frontend or another microservice) defines the interactions it expects from the provider (the API it calls). This consumer-first approach ensures the provider maintains backward compatibility for critical consumer requirements, supporting independent development.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Pact?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.pact.io/" rel="noopener noreferrer"&gt;Pact&lt;/a&gt; is a widely used open-source tool for CDCT that facilitates defining, sharing, and verifying contracts between consumers and providers. With Pact, consumers define expected provider interactions, which are then verified by the provider.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Pact Works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Consumer Pact Tests:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consumers write unit tests to specify interactions expected from the provider. Pact creates a "mock provider" that behaves according to these expectations during testing.&lt;/li&gt;
&lt;li&gt;Once the test suite passes, Pact generates &lt;code&gt;.pact&lt;/code&gt; files capturing each interaction, which act as contracts and can be uploaded to a Pact Broker or &lt;a href="https://pactflow.io/" rel="noopener noreferrer"&gt;PactFlow&lt;/a&gt; for sharing.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Provider Pact Verification:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Providers use the Pact Verifier to validate these contracts by replaying consumer requests against the actual provider API.&lt;/li&gt;
&lt;li&gt;The provider's responses are compared to the consumer's expectations in the contract. Successful validation confirms compatibility, while failures indicate mismatches to be addressed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Publishing Contracts with PactFlow:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PactFlow, a hosted Pact Broker, enables teams to store and share contracts between consumers and providers, automating the process of matching current consumer requirements with provider capabilities.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Can-I-Deploy Checks:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In CI/CD, PactFlow offers the "can-i-deploy" check to ensure compatibility between services before deploying updates, preventing integration issues from reaching production.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Best Practices for Pact and PactFlow
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Isolate Pact Tests:&lt;/strong&gt; Run Pact tests independently of end-to-end tests, focusing specifically on validating API interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version Contracts Carefully:&lt;/strong&gt; Use versioning practices for contracts to maintain compatibility as services evolve.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate in CI/CD:&lt;/strong&gt; Integrate Pact testing into CI/CD pipelines, triggering contract verification on each commit or build. PactFlow simplifies this with automation for contract versioning, compatibility checks, and deployment gating.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benefits of Pact and CDCT
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reduced End-to-End Dependency:&lt;/strong&gt; CDCT reduces the need for exhaustive end-to-end testing by isolating and validating individual service interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Service Autonomy:&lt;/strong&gt; Pact testing allows consumers and providers to evolve independently while ensuring compatibility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rapid Feedback:&lt;/strong&gt; Detect integration issues early with clear and fast feedback loops, ideal for microservices and agile environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the next article, I will try to show you how &lt;a href="https://dev.to/paulsebastianmanole/consumer-driven-contract-testing-with-pact-code-example-3ni6"&gt;CDCT might look like in practice&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>microservices</category>
      <category>contracttesting</category>
    </item>
  </channel>
</rss>
