Home / Companies / WireMock / Blog / March 2024

March 2024 Summaries

5 posts from WireMock

Filter
Month: Year:
Post Summaries Back to Blog
WireMock version 3.5.2 has been released, featuring several updates and improvements, including support for Jetty 12 and enhanced JSONPath performance, which should improve performance in JSONPath matching based on stub setups. The release also introduces HTTP/2 toggles, plain text and TLS HTTP/2 support, configuration options for accept-encoding when proxying, and the ability to remove headers from proxied requests. Various maintenance tasks have been undertaken, such as replacing dependencies and fixing publications, alongside several dependency updates including commons-io, jackson-bom, and mockito-core. Users are encouraged to upgrade to WireMock 3.x and can seek assistance via the WireMock Community Slack channel.
Mar 29, 2024 311 words in the original blog post.
An API-first approach to development emphasizes creating a prototype before drafting the OpenAPI specification, as it allows for iterative design changes and user feedback, reducing the need for rework. This method is likened to GUI mockups, where design validation occurs prior to extensive coding, ensuring the API meets user expectations for seamless data flow and customer experience. Prototyping, especially in complex applications involving multiple APIs or third-party services, helps manage inherent complexity by allowing developers to test interactions and functionality early in the process. Tools like WireMock Cloud facilitate API mocking, enabling developers to simulate system behavior, identify design issues, and validate business objectives, as exemplified by Bilt Rewards, which uses such tools to manage a complex reward system for rent payments. This strategy not only stabilizes API specifications but also confirms that they deliver a superior user experience, proving crucial for the success of ventures like Bilt Rewards.
Mar 25, 2024 1,087 words in the original blog post.
WireMock Cloud introduces a new bidirectional Git synchronization feature for OpenAPI specifications, which streamlines API mocking and prototyping workflows by ensuring automatic updates between the API design and testing environments. This integration allows users to pull OpenAPI specs from Git repositories into WireMock Cloud and push updates back, maintaining consistency without manual copying. The setup involves enabling synchronization in the WireMock Cloud's settings, providing the Git repository's SSH address, and adding a generated SSH public key for secure data flow. The feature supports seamless spec updates, prevents drift between documentation and implementation, and fits flexibly into existing development processes by integrating with popular Git platforms like GitHub, GitLab, and Bitbucket. This advancement aims to enhance efficiency and collaboration in API design and testing, making it easier and faster for development teams to bring their innovations to life.
Mar 25, 2024 539 words in the original blog post.
WireMock has introduced a new feature that uses the Faker library to simulate commonly used data types such as Social Security numbers and telephone numbers, enhancing the realism of API mocks and reducing the manual effort required for curating test data. This feature allows developers to create high-fidelity mock data for testing by generating random yet realistic user information through simple template syntax, helping to uncover edge cases and improve the robustness of applications, as illustrated by a developer named Sarah who uses it to ensure her company's e-commerce platform can handle diverse user data. The data faker can be utilized wherever templating is enabled in WireMock, including response headers, bodies, and webhook requests, by allowing developers to specify the type of data needed, thereby generating data that reflects real-world variability. For more detailed information on its implementation, WireMock's official documentation is recommended.
Mar 13, 2024 287 words in the original blog post.
WireMock Cloud offers a solution to the common issue of API drift by introducing a contract testing module that ensures mock APIs remain in sync with their real-world counterparts. By using an OpenAPI specification as the foundational contract, WireMock Cloud can validate mock APIs against live APIs, detecting and reporting any discrepancies that arise due to changes in API requirements or development lifecycle shifts. This is achieved by capturing HTTP traffic and comparing it to the OpenAPI spec, thus identifying errors in both client requests and mock responses. WireMock’s features, such as recording and OpenAPI to mock generation, facilitate the automatic updating of mock APIs to align with actual APIs. The platform offers two validation modes: soft validation, which reports drift warnings, and hard validation, which blocks requests that do not match the specification, thus preventing potential downstream issues. This approach not only aids in maintaining the accuracy of API interactions but also saves teams time in troubleshooting and aligns them on consistent API contracts.
Mar 01, 2024 520 words in the original blog post.