<?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: Ismail Egilmez</title>
    <description>The latest articles on DEV Community by Ismail Egilmez (@ismailegilmez4).</description>
    <link>https://dev.to/ismailegilmez4</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%2F628766%2F056ce81d-67a5-4489-be1c-687d97ec187a.jpg</url>
      <title>DEV Community: Ismail Egilmez</title>
      <link>https://dev.to/ismailegilmez4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ismailegilmez4"/>
    <language>en</language>
    <item>
      <title>Introducing the New Workflow Dashboard: Off-the-shelf observability for GitHub Actions!</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Wed, 25 Jan 2023 08:27:15 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/introducing-the-new-workflow-dashboard-off-the-shelf-observability-for-github-actions-3a</link>
      <guid>https://dev.to/ismailegilmez4/introducing-the-new-workflow-dashboard-off-the-shelf-observability-for-github-actions-3a</guid>
      <description>&lt;p&gt;&lt;em&gt;Consolidated workflow monitoring independent from repositories they belong to.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Streamline Observability for your CI Workflows: Introducing the New Workflow Dashboard&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As developers, we understand the importance of streamlined and efficient CI workflows. They allow us to quickly and effectively identify and address any issues impacting our codebase and, ultimately, the performance of our applications. That's why we are thrilled to announce the release of a new feature of Foresight - &lt;a href="https://www.runforesight.com/ci-cd-insights-and-analytics" rel="noopener noreferrer"&gt;the Workflow Dashboard&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Foresight provides developers with an off-the-shelf observability dashboard for GitHub Actions, making it easy to spot the elephant in your CI pipeline.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With our new feature, developers can easily troubleshoot CI workflow errors and focus on performance improvement efforts. The dashboard offers a variety of useful insights, including an aggregated view of your workflows with the number of executions, average duration, and the number of erroneous and successful runs. This allows you to quickly identify and address any issues with workflows that are not being fixed or are running slowly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/LUvEBHFFFaM" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh5.googleusercontent.com%2FVfwx0Ks8coyAYNPPGLDuGRazdl5Bj20kfJcwHoGiVD2esB_z76CHZMTCd9y677Txj2JgGPtA_UyHsvJ2TLb5DH1aLmN2kx74CbR995HvCH9iKw47aPFui9Xtw0UZncS5l8_AF1VmuK4jJl_VKe3pO50WdF9RNKV5I64WyNV3dHuLE2AXKqudBGFoZ-_rMQ" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Workflow Dashboard
&lt;/h2&gt;

&lt;p&gt;The Workflow Dashboard is designed to help users easily monitor and track the performance of their CI workflows over time. It combines the functionality of Foresight’s Repositories view and Highlights, allowing users to filter workflows by time, branch, and name. This means that users can quickly identify and address any issues with workflows that are not being fixed or are running slowly. You'll be able to see at a glance which workflows are causing problems and take immediate action to resolve them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh5.googleusercontent.com%2FQ5xMNtA1UrqwvFknPK5jK7cKkTrKl0E4jWz7TPrgJmmOgpWhxK_YHWJw-OwAOrcBhUrjiz7GmPc-6IwXfl16SPY5PqeLao-SIToYNDvz0wxxoWIrY4LFDB_RKcT8PYXGJQNKJXiZjmyn6zaINtqnmYpzA-_vYUzkPKV-nTTNsilYyvP8aTKrj8XTp5pF6w" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh5.googleusercontent.com%2FQ5xMNtA1UrqwvFknPK5jK7cKkTrKl0E4jWz7TPrgJmmOgpWhxK_YHWJw-OwAOrcBhUrjiz7GmPc-6IwXfl16SPY5PqeLao-SIToYNDvz0wxxoWIrY4LFDB_RKcT8PYXGJQNKJXiZjmyn6zaINtqnmYpzA-_vYUzkPKV-nTTNsilYyvP8aTKrj8XTp5pF6w" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Workflow Dashboard also includes a search feature, allowing users to focus on specific workflows across multiple repositories. This is especially useful for teams that are working on multiple codebases or projects at the same time. The search function allows you to quickly and easily find the specific workflows you're interested in without navigating multiple repositories. You can easily troubleshoot any issues that may be impacting the performance of your CI workflows, saving you time and increasing your productivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Would you use it?
&lt;/h2&gt;

&lt;p&gt;The benefits of Foresight’s GitHub Actions CI Monitoring feature are numerous. You can achieve faster and more reliable analytics for your CI pipelines, troubleshoot errors, detect anomalies, and achieve higher CI visibility and performance.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;By optimizing your build times and assessing GitHub Actions Performance analytics, you can save more than the cost of using our tool. And the best part is our feature is always free for open-source projects.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh6.googleusercontent.com%2F8TYtpQcyFskgnvqALjSTolH7xQb6gCAYY1V8MgkYeONqZ53yulGrQ6zghZAs3AXUVc1zmxjc6UDlmAQgzm5m7Ymhjppavfe65QEC-k8e1y1j2R7Pn_Vn0zy3JearqrCclopFwyvPV63NYdopvsgKKZMVVaW1iCTE7fEkU_Z74zrqxCUTT6AijHg8X2EAIw" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh6.googleusercontent.com%2F8TYtpQcyFskgnvqALjSTolH7xQb6gCAYY1V8MgkYeONqZ53yulGrQ6zghZAs3AXUVc1zmxjc6UDlmAQgzm5m7Ymhjppavfe65QEC-k8e1y1j2R7Pn_Vn0zy3JearqrCclopFwyvPV63NYdopvsgKKZMVVaW1iCTE7fEkU_Z74zrqxCUTT6AijHg8X2EAIw" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another key benefit of Foresight’s GitHub Actions CI Monitoring is the ability to track your workflow issues daily. You can figure out at what point the failure rate began to rise and take action to address the problem. This means you can quickly identify when an issue begins to occur and take action to fix it as soon as possible.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh4.googleusercontent.com%2FPu1LFqVn5RgpHcEuB33PQwsztHg5I04CcsXth2G6seIcm7p-WzxqgtlJZE9kWcRytf_VQ7jZWO4yIa_ydrdd3zRpIAddh8vtTtzapzU8Pa7a7ULmi5pKe4Ajk9oLVx9uQY8eVSVHZnB2nhR97oK6DSVY6OpyEB4wweGUZ2hJCXqrAs4_ORTlX2E40ecf9A" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh4.googleusercontent.com%2FPu1LFqVn5RgpHcEuB33PQwsztHg5I04CcsXth2G6seIcm7p-WzxqgtlJZE9kWcRytf_VQ7jZWO4yIa_ydrdd3zRpIAddh8vtTtzapzU8Pa7a7ULmi5pKe4Ajk9oLVx9uQY8eVSVHZnB2nhR97oK6DSVY6OpyEB4wweGUZ2hJCXqrAs4_ORTlX2E40ecf9A" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This feature also explains how pull requests (PR) affect your workflow run duration. With this information, you can identify the major impacts of a PR on your workflows and tests and take action to prevent production regressions early in the CI environments. This means you can catch errors before they make it to production, saving you time and resources in the long run.&lt;/p&gt;

&lt;p&gt;Foresight also provides granular details, such as breakdowns of duration and failure rates for individual stages and jobs, allowing you to see which steps are blocking your CI pipeline. Additionally, our feature allows you to view your tests' duration, status, and flakiness in a workflow and compare it to previous runs to identify potential performance regressions. This means you can identify slow and flaky tests and take action to improve their performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2FlZYjvjSGQqL9UbFvsS_heD4FmQeOCha3GYuc-qfO2IANvJOH-7hiOLx8dmDVZqLSjTpcwpcHN8cve9SENJHwyjh7EDhpHA4ttJ3AkoL-2EFLJT-L4Ik8pDoNCmuep8i0W3Fa2fwTLO3fPk7doBYZdSuzVUw71Hibz6wF-hQxwnb7rAfP8e8sW9FNVvrHfA" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2FlZYjvjSGQqL9UbFvsS_heD4FmQeOCha3GYuc-qfO2IANvJOH-7hiOLx8dmDVZqLSjTpcwpcHN8cve9SENJHwyjh7EDhpHA4ttJ3AkoL-2EFLJT-L4Ik8pDoNCmuep8i0W3Fa2fwTLO3fPk7doBYZdSuzVUw71Hibz6wF-hQxwnb7rAfP8e8sW9FNVvrHfA" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The workflow dashboard also includes detailed trace charts and logs, making it easy to detect unusual behaviors on your GitHub Actions workflows and begin troubleshooting and optimizing. This means you can gain a deep understanding of how your CI pipeline is behaving and take action to improve it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2FIwfoG2_RWoBnz7_D9N536P6V_2yBcPB_2-bBvpERK7MYdJn9IZKWkvPpDEf-pdSYzZJm4lAGN0g9CC-m9GUEBFiM6LYIPlzcKWOGRo13vasehY-72MykimaxpRVWHDjFCfZSQdoTkCRo4GN6xv1pFQW4ncBmIxArVuaOPzFtvr-_yjOLlAyhSJ3BocjE5g" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2FIwfoG2_RWoBnz7_D9N536P6V_2yBcPB_2-bBvpERK7MYdJn9IZKWkvPpDEf-pdSYzZJm4lAGN0g9CC-m9GUEBFiM6LYIPlzcKWOGRo13vasehY-72MykimaxpRVWHDjFCfZSQdoTkCRo4GN6xv1pFQW4ncBmIxArVuaOPzFtvr-_yjOLlAyhSJ3BocjE5g" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow Dashboard for Software Teams
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Engineering Leaders
&lt;/h3&gt;

&lt;p&gt;As an engineering manager or leader, it's important to have a clear understanding of the performance of your team's CI workflows. This is crucial to ensure that your team delivers high-quality software on time and within budget. With the new "workflow dashboard" feature of Foresight, you can easily monitor and track the performance of your team's workflows over time.&lt;/p&gt;

&lt;p&gt;One of the key benefits of the workflow dashboard is the ability to search by workflow name. This makes it easy to focus on specific workflows across multiple repositories, which is especially useful for teams working on multiple codebases or projects simultaneously. This allows you to quickly and easily find the specific workflows you're interested in without navigating multiple repositories.&lt;/p&gt;

&lt;h3&gt;
  
  
  Developers
&lt;/h3&gt;

&lt;p&gt;You’d want to ensure that your code is integrated and deployed correctly and that any issues are identified and addressed quickly. With the new "workflow dashboard" feature of Foresight, you can easily monitor and track the performance of your workflows over time.&lt;/p&gt;

&lt;p&gt;Additionally, the Workflow Dashboard provides granular details, such as breakdowns of duration and failure rates for individual stages and jobs, and view the duration, status, and flakiness of tests in a workflow. This can help developers identify slow and flaky tests and take action to improve their performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  DevOps Teams
&lt;/h3&gt;

&lt;p&gt;As a DevOps team, it's important to understand the performance of your organization's CI workflows clearly. This is crucial to identify any issues promptly and ensure that the code is being integrated and deployed correctly. DevOps teams can monitor the performance and health of your organization’s workflows with Foresight’s workflow dashboard consolidated from a single pane of glass.&lt;/p&gt;

&lt;p&gt;With the workflow dashboard, DevOps teams can better understand the overall health of their organization's codebase, identify any bottlenecks in the CI pipeline and focus on specific workflows for improvement. This helps teams to improve their efficiency and release better software to their customers.&lt;/p&gt;

&lt;h3&gt;
  
  
  QA Teams
&lt;/h3&gt;

&lt;p&gt;QA teams need to clearly understand the performance of the CI workflows that impact your testing efforts. With the new "workflow dashboard" feature of Foresight, your team can easily monitor and track the performance of specific workflows over time, including the number of executions, average duration, and the number of successful and erroneous runs. This allows you to quickly identify any issues with workflows that may be impacting your testing efforts and take action to address them.&lt;/p&gt;

&lt;p&gt;In addition, the workflow dashboard allows QA teams to view granular details such as breakdowns of duration and failure rates for individual stages and jobs. This helps the QA team identify the blocking steps in the pipeline and thus helps to improve the pipeline.&lt;/p&gt;

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

&lt;p&gt;We understand the importance of streamlined and efficient CI workflows for our developer community, and we are committed to providing the best tools to help you achieve this. With the new Workflow Dashboard, we are taking a big step forward in helping you achieve more efficient and effective CI workflows.&lt;/p&gt;

&lt;p&gt;Overall, our new GitHub Actions CI Monitoring feature is a powerful tool that helps developers improve the performance of their CI pipelines and deliver better software to their customers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can easily troubleshoot issues, detect anomalies, and optimize your CI pipeline for better performance.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We encourage our users to check out the &lt;a href="https://docs.runforesight.com/features/workflow-dashboard" rel="noopener noreferrer"&gt;Workflow Dashboard&lt;/a&gt; and let us know your thoughts. We always seek feedback and suggestions on improving our products to serve our community better.&lt;/p&gt;

&lt;p&gt;You can install Foresight’s GitHub application from the &lt;a href="https://github.com/marketplace/thundra-foresight" rel="noopener noreferrer"&gt;GitHub Marketplace&lt;/a&gt;. The workflow dashboard feature comes off the shelf without needing any extra configurations. You can find the quick configuration guide of Foresight from this &lt;a href="https://docs.runforesight.com/step-by-step-guide" rel="noopener noreferrer"&gt;documentation link&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>discuss</category>
      <category>writing</category>
    </item>
    <item>
      <title>What Is Cloud-based Software Testing and How Can It Enhance Testing Services?</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Tue, 08 Nov 2022 11:09:03 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/what-is-cloud-based-software-testing-and-how-can-it-enhance-testing-services-1pj4</link>
      <guid>https://dev.to/ismailegilmez4/what-is-cloud-based-software-testing-and-how-can-it-enhance-testing-services-1pj4</guid>
      <description>&lt;p&gt;Due to the sudden upsurge in the usage of software applications around the globe, enterprises are finding it extremely difficult to meet the time to market demands.  &lt;a href="https://www.runforesight.com/blog/series-2-building-a-test-automation-team"&gt;&lt;strong&gt;Enterprise QA teams&lt;/strong&gt;&lt;/a&gt;  that are able to detect errors at the earliest will have more time to work on various other development phases as well as enhance the application quality. With the advent of cloud computing technology, enterprises have leveraged several innovative opportunities in software testing and software deployment. It has opened new possibilities, particularly in the domain of software testing &amp;amp; maintenance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.testrigtechnologies.com/get-ready-for-some-of-the-best-cloud-testing-trends-in-2021/"&gt;&lt;strong&gt;Cloud-based software testing&lt;/strong&gt;&lt;/a&gt;  is a set of procedures, tools, and processes that are leveraged by testers inefficiently and precisely testing software. With the utilization of Cloud service models, enterprises can implement testing as a service, without the need to completely invest in testing labs, tools, or infrastructure. Cloud services deal with not just testing but also everything from cloud security, software development, resource utilization, etc.&lt;/p&gt;

&lt;p&gt;Without a proper test, the software will always be vulnerable to threats, errors, security breaches, and many more factors that will significantly affect customer experiences. Therefore, while selecting a test tool, infrastructure, or automation service from the cloud, testers must completely understand its platform compatibility, resource support, flexibility, and  &lt;a href="https://www.runforesight.com/blog/the-known-and-unknown-costs-of-ci-testing"&gt;&lt;strong&gt;service cost&lt;/strong&gt;&lt;/a&gt;. Completely ingraining QA, at multiple phases of cloud adoption and administration, must be an overriding mandate. This means enterprises must carry out robust QA planning and stipulation to guarantee that the Cloud services cover the entire  &lt;a href="https://www.runforesight.com/blog/building-a-test-automation-strategy"&gt;&lt;strong&gt;test automation process&lt;/strong&gt;&lt;/a&gt;  successfully. Moreover, enterprises must be keenly conscious of the growing levels of regulatory scrutiny of Cloud technology. Clients anticipate seeing proof that enterprises have fully completed and implemented cloud-based software testing strategies for data, flexibility, and application exit.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can Cloud Computing Enhance Software Testing
&lt;/h2&gt;

&lt;p&gt;Cloud computing technology has revolutionized the way enterprises utilize IT resources across a software development life cycle. From development and testing to the final deployment, it has enhanced the software life cycle and has significantly reduced time as well as cost. Cloud Computing is defined as a platform for facilitating omnipresent, relevant, budget-friendly, on-demand network access to multiple computing resources at a time. Enterprises can leverage everything from networks and servers to storage and tools without having to buy the entire solution. These resources can be rapidly provisioned from the cloud and implemented with minimum administration effort or service provider interaction.&lt;/p&gt;

&lt;p&gt;This makes it all the more imperative for enterprises to leverage cloud services across the different business operations.&lt;/p&gt;

&lt;p&gt;Here are some benefits for enterprises that leverage cloud computing technology:&lt;/p&gt;

&lt;p&gt;1)&lt;strong&gt;On-demand self-service:&lt;/strong&gt; Computing resources such as server performance time and cloud storage can seamlessly be utilized by the enterprise. Once the enterprise signs up for the required services, there will be no need for interaction with the cloud service provider.&lt;/p&gt;

&lt;p&gt;2)&lt;strong&gt;Broad network access:&lt;/strong&gt; The cloud interaction or the communication between devices are all based on the cloud network services. Therefore large enterprises that leverage multiple IoT devices, smart devices, machines, or even laptops and phones can seamlessly interconnect and access devices through cloud networks.&lt;/p&gt;

&lt;p&gt;3)&lt;strong&gt;Resource pooling&lt;/strong&gt;: Public computing resources are distributed and accessed by several consumers beyond a single enterprise. This type of resource sharing helps companies leverage processing, storage, memory, data centers, and much more from different geographical locations.&lt;/p&gt;

&lt;p&gt;4)&lt;strong&gt;Rapid elasticity:&lt;/strong&gt; Computing resources can automatically be provisioned to enterprises for time being based on the need. The resources are mostly under a pay-as-you-use policy which makes it easier for enterprises to implement them or cancel them when not needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Cloud-Based Software Testing
&lt;/h2&gt;

&lt;p&gt;The majority of the IT companies and software developers are now migrating their legacy systems to a cloud ecosystem for better  &lt;a href="https://thinkpalm.com/services/test-automation-services/"&gt;&lt;strong&gt;test automation services&lt;/strong&gt;&lt;/a&gt;. With cloud-based testing, their applications are scalable, flexible, and easily adaptable. Here are some reasons why enterprises are adopting  &lt;a href="https://www.runforesight.com/blog/testing-tips-for-todays-distributed-cloud-environments"&gt;&lt;strong&gt;cloud-based software testing&lt;/strong&gt;&lt;/a&gt;  over traditional or manual application testing.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;It significantly reduces the expenses and the process cycles by sharing the resources when the testing strategy is performed. This is because cloud-based Testing as a Service (TaaS) enables IT and software developers to initialize practical experimental tests on cloud platforms without the necessity to possess licenses or purchasing the resource. This reduces the expenses of testing and improves sharing of resources and the use of services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Better testing environment of testing and virtual infrastructures. The flexibility of cloud technology enables enterprises to leverage TaaS from any part of the globe as long as the place has a good internet connection. Also, the cloud provides a better virtual environment for testing and SaaS solutions that support the entire testing life cycle, including development. With these virtual infrastructures, enterprises will not have to spend a lot on real labs or traffic generators but just lease the resources from the cloud.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Pay per use policy of cloud services is the most notable factor for enterprises. As opposed to traditional software testing, in cloud-based software testing, enterprises can choose the resource, tools, or technologies for just the time they need. They will have to only pay for the service based on the utilization time and can stop leveraging cloud services once the testing is complete.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Cloud computing and cloud-based software testing open up new possibilities for QA teams and software development companies. Especially during the current COVID-19 crisis, when there are huge restrictions on human interactions, manual testing will face severe challenges. With the adoption of Cloud-based software testing, enterprises can leverage cloud solutions from any part of the globe at any given time. Even the post-covid era will see a rise in technological innovations, where more applications will have modern advancements such as Artificial Intelligence and Machine Learning integrated into their architecture. To efficiently test such applications and ensure zero errors, enterprises must invest in cloud computing and test automation services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus Section:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Observability for Cloud-based Software Testing
&lt;/h3&gt;

&lt;p&gt;The shift-left paradigm shows that observability has to be implemented early in the software development lifecycle because it is incontrovertible that any bug in production is more costly than the biggest pre-production failure.&lt;/p&gt;

&lt;p&gt;Testing is a must to deliver reliable software to your end-users. Since modern applications are architectured in a distributed way, hosted in the cloud or on-prem, it is difficult to test them and even more difficult to troubleshoot when tests fail.&lt;/p&gt;

&lt;p&gt;By being able to gather data from the app in real-time, developers and QA engineers gain 100% code-level observability and faster resolution of test failures.  &lt;a href="https://www.runforesight.com/"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  replaces the iterative, non-agile process required today for debugging failed builds in CI pipelines.  &lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  is platform-agnostic, working on-prem, in the cloud, on containers, and on serverless code.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>testing</category>
      <category>cicd</category>
      <category>github</category>
    </item>
    <item>
      <title>Never miss critical changes in your GitHub Actions workflows</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Thu, 13 Oct 2022 07:01:06 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/never-miss-critical-changes-in-your-github-actions-workflows-2c5f</link>
      <guid>https://dev.to/ismailegilmez4/never-miss-critical-changes-in-your-github-actions-workflows-2c5f</guid>
      <description>&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Delivering application code at a high pace is possible using GitHub Actions. It lets you automate and manage CICD workflows directly from your GitHub repositories. By using GitHub Actions you can build, test, and deliver code automatically, fast, and safely. You can use any webhook to trigger events such as automatically building and testing code for each pull request.&lt;/p&gt;

&lt;p&gt;In other words, you can create your CI pipelines with ease. Theoretically, everything looks fine but when it comes to practice “everything fails, all the time” as AWS CTO, Werner Vogels says.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Foresight is the missing observability piece of GitHub Actions!&lt;/strong&gt; Foresight provides CI and test observability into your GitHub Actions workflows, helping you maintain their health and performance. In this post, we will cover the need for getting notified about the CI workflow or test failures and how Foresight helps.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the challenge?
&lt;/h2&gt;

&lt;p&gt;Missing critical changes that may end up with production bugs is a huge FOMO. Nobody sits all day and monitors their software. But when something goes wrong, missing it can cause serious problems. Developers, DevOps, SREs, testers, QAs, and engineering leaders often face this challenge.&lt;/p&gt;

&lt;p&gt;Pinpointing the root cause of errors in your CI workflows and tests as they occur might be vital on some occasions. For example when introducing a new feature to production, it might not have been well tested enough. Or you can easily introduce a bug into production because a flaky test passed and your build ended with success.&lt;/p&gt;

&lt;p&gt;Some of the critical challenges that you can overcome by using proactive alerting such as Foresight “rules” are;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Affected Users&lt;/strong&gt;. Not being aware of errors, latencies or critical changes in your CI workflows or tests may let you introduce bugs to your production environment. Your end users can get badly affected due to this reason.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Cost&lt;/strong&gt;. Missing critical errors or latencies may cause high costs.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Visibility&lt;/strong&gt;. Existing APM or error tracking tools lack a holistic view of your test and CI workflows’ health and performance.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Speed&lt;/strong&gt;. Increased time-to-detect due to a lack of monitoring and observability across CI workflows and tests.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Restoration&lt;/strong&gt;. Higher mean-time-to-recover because of lacking CI observability and poor notification.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Collaboration issues&lt;/strong&gt;. Disparate tooling across the organization complicates cross-team collaboration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is a solid use case that happens in an engineering team. In this use case; build times increase and developers don’t know the reason why. It starts impacting the developer productivity and their engineering manager finds a solution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.runforesight.com/use-cases/the-cost-of-missing-critical-ci-metrics"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rqwDn7Nc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hm7857dsl0woxw0hwntq.png" alt="Image description" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Anatomy of a rule
&lt;/h2&gt;

&lt;p&gt;Rules lets you set up robust and customizable policies for your workflows and tests. You can receive notifications for fluctuations in key performance metrics as your workflows run.&lt;/p&gt;

&lt;p&gt;The below gif showcases how to create a rule in Foresight for your workflows and tests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.runforesight.com/features/rules"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KFnky3Or--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8obyicgoa0x6b8u312cn.gif" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Predefined rule templates
&lt;/h3&gt;

&lt;p&gt;We’ve made some rule templates for you to easily set your rules for your workflows within a couple of clicks. We got inspired by our customers’ needs and requirements while creating these rule templates. Below are some examples of the templates we created for you.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Increase in the duration of a workflow compared to the previous week.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Whenever the average duration of a workflow increases from 4mins to 5mins, you will get a notification.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mKOX7Q7H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rrso92ysws8mwtlr1vv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mKOX7Q7H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rrso92ysws8mwtlr1vv1.png" alt="Image description" width="698" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Increase in the failure rate of a workflow compared to the previous week.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;When the failure rate of a workflow increases from 10% to 30%, you will get a notification&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NwPadytz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4di9iojjuozhsbdcrsw6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NwPadytz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4di9iojjuozhsbdcrsw6.png" alt="Image description" width="698" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Workflow failure rate exceeds the limit set&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;When a failure rate of a workflow exceeds 10%, you will get a notification.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0T89Og6o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qjk0uffdihl04udhi82n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0T89Og6o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qjk0uffdihl04udhi82n.png" alt="Image description" width="699" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Notification Channels
&lt;/h3&gt;

&lt;p&gt;Foresight rules are a powerful tool for ensuring your CI workflows’ integrity. Notification alerts let you filter on a number of different aspects of your CI workflows’ and tests’ behavior, tying multiple complex objects together behind a unifying rules interface that is both easy to use and high-powered.&lt;/p&gt;

&lt;p&gt;You can connect your Foresight rules notifications with incident management tools like PagerDuty and Opsgenie. You can choose directly receive notifications to your email or Slack. Or else, you can connect them anywhere through webhook. With configurable rules, you can rely upon Foresight alerts to provide you with up-to-date information when things go wrong.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rM1-1_9C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o20hqeprwo6nuixrhoe1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rM1-1_9C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o20hqeprwo6nuixrhoe1.png" alt="Image description" width="597" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OdT3_kLt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kde4m7w34eo1jq20br0m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OdT3_kLt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kde4m7w34eo1jq20br0m.png" alt="Image description" width="880" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to make your CI pipeline shine
&lt;/h2&gt;

&lt;p&gt;With Foresight, you won’t miss any critical information such as a change, a failure, a latency, etc. from now on. You can receive notifications for fluctuations in your key CI performance metrics.&lt;/p&gt;

&lt;p&gt;You can set your rules to get notified about critical changes, and flow them through your Slack, email, PagerDuty, OpsGenie, and more.&lt;/p&gt;

&lt;p&gt;You can quickly remediate failing builds and performance regressions, allowing your teams to focus on developing new features. Just set up your alert rule to be notified when a test is longer than usual and optimize slow tests to speed up your pipelines.&lt;/p&gt;

&lt;p&gt;Here’s what you can achieve by having an observable CI pipeline that notifies you correctly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Reliable Products&lt;/strong&gt;. By being able to pinpoint any deficiencies or regressions as they occur, engineering teams can deliver more robust and reliable products.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Faster delivery&lt;/strong&gt;. Automating notifications over CI and test failures lead to faster test cycles, which accelerates deployment frequency.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;MTTR&lt;/strong&gt;. Resolving deficiencies quickly before going to production drastically helps to decrease the mean time to resolution.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Productivity&lt;/strong&gt;. Developer productivity is boosted when their strings are not attached. Developers start spending more time on innovation and improving the customer experience and less time putting out fires.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Easier Audits&lt;/strong&gt;. You can log your notifications and actions taken afterward, enabling post-incident review.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Executive Trust and Confidence&lt;/strong&gt;. Because incidents are resolved quickly with little customer impact, executives no longer lose sleep at night and trust that CICD pipelines will stay up and available.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get started, all you have to do is to install  &lt;a href="https://github.com/marketplace/thundra-foresight"&gt;Foresight’s GitHub application&lt;/a&gt;  and  &lt;a href="https://app.runforesight.com/signup"&gt;signup for Foresight&lt;/a&gt;  to get your account. It is FREE for open-source projects and has a very generous free plan for small and medium sized organizations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--caNt9isH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yula3nm9oz6xla0zb9gn.png" alt="Image description" width="880" height="688"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MvNxkpHt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cbw65d5i3sz8li7dkl8e.png" alt="Image description" width="880" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Foresight’s “rules” feature brings the ability to stay on top of any changes in your CI pipelines. Missing critical changes that may end up with production bugs is a huge FOMO. To overcome this, we came up with “rules” that make it possible to define potential scenarios and automated actions when prerequisites are met.&lt;/p&gt;

&lt;p&gt;To be more precise, you can say “&lt;strong&gt;Send an alert notification with a high severity to my PagerDuty when my xyz CI pipeline’s failure rate exceeds 10%&lt;/strong&gt;”.&lt;/p&gt;

&lt;p&gt;Or you can make comparisons such as “&lt;strong&gt;Send a notification to my Slack when there’s an increase in the average duration of my xyz workflow compared to the previous week&lt;/strong&gt;”.&lt;br&gt;&lt;br&gt;
Go ahead and take action to improve your developer productivity. If you realize your current setup isn’t providing enough control over your CI metrics, try using Foresight to proactively monitor your CI workflows and tests.&lt;br&gt;&lt;br&gt;
Up on the horizon, we’ll be coming up with much more advanced querying and alerting capabilities of Foresight “rules”. We’ll be happy to listen to your ideas and needs to facilitate success in your CI workflows using Foresight.&lt;/p&gt;

&lt;p&gt;For more information about configuring our integration, refer to our  &lt;a href="https://docs.runforesight.com/"&gt;docs&lt;/a&gt;. Please submit your requests to  &lt;a href="//mailto:support@runforesight.com"&gt;support@runforesight.com&lt;/a&gt;  or come to our  &lt;a href="https://discord.gg/vfqkkW9b"&gt;Discord community&lt;/a&gt;  and let’s chat. You can  &lt;a href="https://app.runforesight.com/signup"&gt;sign up for Foresight&lt;/a&gt;  or see the  &lt;a href="http://app.runforesight.live/"&gt;live demo&lt;/a&gt;  to see Foresight in action.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>github</category>
      <category>cicd</category>
      <category>programming</category>
    </item>
    <item>
      <title>5 Best Logging Solutions for Java</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Wed, 05 Oct 2022 13:21:52 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/5-best-logging-solutions-for-java-29lc</link>
      <guid>https://dev.to/ismailegilmez4/5-best-logging-solutions-for-java-29lc</guid>
      <description>&lt;h2&gt;
  
  
  What is Logging in Java
&lt;/h2&gt;

&lt;p&gt;Logging is the process of recording the application insights as a readable log file. It is an important requirement for any application since it helps identify issues and fix bugs in applications while improving performance.&lt;/p&gt;

&lt;p&gt;Logging frameworks are similar to the daily diary of a web application. They keep track of activities, errors, and sensitive details of internal processes. Therefore, picking the most secure and reliable option is crucial when selecting a logging framework.&lt;/p&gt;

&lt;p&gt;In this article, I will discuss the best logging frameworks optimized for Java, focusing on their characteristics to help you choose the best.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Log4J and Log4J 2 - A well-known logging solution for Java
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZPFXHaZv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7b2384729f022a759538_log4j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZPFXHaZv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7b2384729f022a759538_log4j.jpg" alt="" width="880" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Log4J(&lt;a href="https://logging.apache.org/log4j/2.x/"&gt;https://logging.apache.org/log4j/2.x/&lt;/a&gt;) is a Java-based logging framework. It is a part of Apache Logging Services. It was also the most popular and widely used Java logging solution until the exposure of its &lt;a href="%5Bhttps://www.cisa.gov/uscert/ncas/alerts/aa21-356a%5D(https://www.cisa.gov/uscert/ncas/alerts/aa21-356a)"&gt;Log4Shell&lt;/a&gt; vulnerability last year.&lt;/p&gt;

&lt;p&gt;Log4J 2 is the actively maintained version of Log4J, and it has some amazing features for developers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;API separation for forward compatibility&lt;/strong&gt;  - The isolated Log4J API from the implementation is a significant feature. It guarantees the forward compatibility of web applications' code. And also, it creates loosely coupled logging framework integration.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Automatic reloading of configuration&lt;/strong&gt;  - During the application runtime, Log4J2 supports reloading the framework if there are any configuration changes without affecting the application and its previous logs.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Asynchronous logging for better performance&lt;/strong&gt; - Many developers unintentionally make their web applications slow by not focusing on the performance of the logging framework. However, Log4J2 has asynchronous logging, which has significantly large throughput. especially when the program executes in a multi-threaded environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, async logging is not enabled by default. Hence, it is better to check all the pros and cons beforehand through the official Apache documentation if you wish to enable async logging.&lt;/p&gt;

&lt;p&gt;As a free and open-source Java logging framework, Log4J 2 is good for web applications that do not deal with sensitive data. On the other hand, there can be security and reliability loopholes due to the openness and majority of users of the framework. So you must constantly check for security updates and patches.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Logback - A free and open source modularized logging framework
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3o-0Vidb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7b80db47e77b46f895b3_logback.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3o-0Vidb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7b80db47e77b46f895b3_logback.jpg" alt="" width="880" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Logback(&lt;a href="https://logback.qos.ch/"&gt;https://logback.qos.ch/&lt;/a&gt;) is another non-commercial Java logging framework. It labels itself as a successor to the previously discussed Log4j framework.&lt;/p&gt;

&lt;p&gt;Logback has three main modules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;logback-core&lt;/strong&gt;  - The base module which is essential for operating the other two modules.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;logback-classic&lt;/strong&gt;  - This module implements SLF4J API allowing developers to easily integrate with other logging frameworks if required.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;logback-access&lt;/strong&gt;  - This allows communication with Java Servlet containers (e.g., Tomcat and Jetty) so that its framework can provide HTTP access logs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition, Logback has a simple architectural design with some exciting features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Automatic log archive cleanup&lt;/strong&gt;: You can configure Logback to delete the archives using the &lt;code&gt;maxHistoryproperty&lt;/code&gt; of &lt;code&gt;TimeBasedRollingPolicy&lt;/code&gt; or &lt;code&gt;SizeAndTimeBasedFNATP&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Automatic log archive compression:&lt;/strong&gt;  Logback can automatically compress archived logs in an asynchronous manner. So there will be no significant performance impact on your application during the compression process as well.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Easy to implement:&lt;/strong&gt;  This library has a well-modularized design and a more familiar implementation of the famous Log4J framework. It is developer-friendly and quick to set up.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Suppose you are a Java developer looking for a free logging framework but do not want to risk using Log4J or Log4J2. In that case, I recommend you to have a look at Logback.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Tinylog - A lightweight logging framework
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RZLPmZ4h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7baed9c95542e348f3ba_52wkiyPhXB.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RZLPmZ4h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7baed9c95542e348f3ba_52wkiyPhXB.png" alt="" width="880" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tinylog(&lt;a href="https://tinylog.org/v2/"&gt;https://tinylog.org/v2/&lt;/a&gt;) is a lightweight logging framework for Java and Andriod applications. It is an open-source framework and can be used with any JVM language like Kotlin and Scala.&lt;/p&gt;

&lt;p&gt;Although it is relatively new and lightweight, it brings some unique features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Static logger class:&lt;/strong&gt;  This implementation allows you to use the logger directly instead of creating logger instances everywhere you need to create logs.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Fast output of log records:&lt;/strong&gt;  The benchmarks prove that the tinylog is well optimized for writing log outputs to files.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Lightweight:&lt;/strong&gt;  Most significant feature of tinylog is the small library size of approx. 178KB only.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are looking for a small-size free and open-source logging framework, Tinylog is one of the best options you have.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Solarwinds Loggly - A commercial logging toolkit with HTTP/HTTPS log management
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cXOn4V5q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7bdee2a33e38919c6693_985w-3PmfW.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cXOn4V5q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7bdee2a33e38919c6693_985w-3PmfW.jpg" alt="" width="880" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using text-based logging frameworks comes in for practical difficulties like analyzing logs, time-consuming log search, and third-party integrations.&lt;/p&gt;

&lt;p&gt;Loggly by Solarwinds(&lt;a href="https://www.solarwinds.com/loggly"&gt;https://www.solarwinds.com/loggly&lt;/a&gt;) resolves these issues by providing a log management toolkit and a Java extension that can record logs. It is a commercial product and offers 4 different packages, including a free trial.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Lite - Free version&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Standard&lt;/strong&gt;  - Starting at 79 USD per month. This package is annually billed and suitable for small-scale businesses.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Pro&lt;/strong&gt;  - This package, starting at 159 USD per month, is annually billed and suitable for growing businesses.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Enterprise&lt;/strong&gt;  -This package, which starts at 279 USD per month, is annually billed. It includes all the features.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Loggly has user-friendly log management options like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Centralized Log Monitoring Tool&lt;/li&gt;
&lt;li&gt;  Automated Log Summaries&lt;/li&gt;
&lt;li&gt;  Smart Querying of Logs with Filters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However if you are running on a tight budget, using Loggly can be tricky due to its expensive pricing model.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Sidekick - An alternative to all logging solutions
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5XAghbW3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7c0198ae08ba831e1cd0_Sidekick_Logo%28horizontal%29.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5XAghbW3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d7c0198ae08ba831e1cd0_Sidekick_Logo%28horizontal%29.jpg" alt="" width="880" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As has been discussed, there are many Java logging frameworks with different features. But, there is a major limitation with all of them. They do not allow you to add logs into the built-in dependencies of your web application.&lt;/p&gt;

&lt;p&gt;Sidekick(&lt;a href="https://www.runsidekick.com/"&gt;https://www.runsidekick.com&lt;/a&gt;) resolves this issue by allowing developers to put logpoints in dependencies. Apart from the simplicity, the below items explain  &lt;em&gt;why Sidekick is an alternative to the other logging solutions&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Dynamic logging&lt;/strong&gt;  - This feature allows developers to add and remove logs on demand. You can add logs to your running applications without stopping or redeploying it. This feature not only solves the issues of traditional logging but also does not bring any overhead or security issues.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ingest collected logs anywhere&lt;/strong&gt;  - Sidekick makes it easier to add new logs to multiple services without rebooting &amp;amp; redeploying and then you can start sending your logs to anywhere you wish. Here are some  &lt;a href="https://docs.runsidekick.com/sidekick-recipes"&gt;recipes&lt;/a&gt;  telling about how you can send your logs to your Loki or Elastic instances.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Integrations with IDEs&lt;/strong&gt;  - This feature is one of my favorites. It allows developers to debug applications within the IDE itself with the Sidekick plugin. At the moment, this integration works well with IntelliJ IDEA, VSCode, and PyCharm.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The below process shows how Sidekick works in a nutshell.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kiTi_bSH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d723ac47e007d30ed162b_kIxQ4CgfMt32qwysAEiewokMAH5uyaF6pPMOygI3qzmIntV6k1XNWOByTGL8oEiv050h0tJ-7_twm6eorUs_sp4ulCH59wg9PzjRDzhu0y6macq-fUqmEpW9Kt4qWgH2_-J7JW9SODvcegWaAtys-F6aQPADEmvR1dw1vRGyKf-EOuKpBPWf8tky8Q.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kiTi_bSH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d723ac47e007d30ed162b_kIxQ4CgfMt32qwysAEiewokMAH5uyaF6pPMOygI3qzmIntV6k1XNWOByTGL8oEiv050h0tJ-7_twm6eorUs_sp4ulCH59wg9PzjRDzhu0y6macq-fUqmEpW9Kt4qWgH2_-J7JW9SODvcegWaAtys-F6aQPADEmvR1dw1vRGyKf-EOuKpBPWf8tky8Q.gif" alt="" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are looking for a secure and reliable Java logging framework, Sidekick is the go-to option. As you can use this for free, I highly recommend trying it out by yourself. You can get started from the official documentation below.&lt;/p&gt;

&lt;p&gt;Official Sidekick Documentation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.runsidekick.com/"&gt;https://docs.runsidekick.com/&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Selecting a reliable and secure logging framework for Java applications is more complicated than it sounds. Especially with the identified Log4J vulnerability last year, many developers and product owners are highly picky about logging frameworks.&lt;/p&gt;

&lt;p&gt;However, in this article, I have presented 5 latest Java logging solutions with their features, including my thoughts about each of them. Based on my hands-on experiences, the following comparison summarizes each of the above-discussed logging solutions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wp6qIRUZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d83475a2f99501e6848c9_Java%2520Logging%2520Solutions%2520Comparison.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wp6qIRUZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/61d43b176a18b710f8c102b8/633d83475a2f99501e6848c9_Java%2520Logging%2520Solutions%2520Comparison.png" alt="" width="880" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this article will help you explore the aforementioned frameworks further and pick the best one for your needs. Thank you for reading!&lt;/p&gt;

</description>
      <category>java</category>
      <category>logging</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Observability for CI workflows on GitHub Enterprise</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Mon, 26 Sep 2022 13:15:54 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/observability-for-ci-workflows-on-github-enterprise-2f76</link>
      <guid>https://dev.to/ismailegilmez4/observability-for-ci-workflows-on-github-enterprise-2f76</guid>
      <description>&lt;h2&gt;
  
  
  Foresight Plays Well with GitHub Enterprise
&lt;/h2&gt;

&lt;p&gt;Automatic application deployment and delivery are essential to the success of software development projects today. This allows applications to be quickly deployed to production environments and minimizes the risk of issues that may arise when applications are deployed manually. However, the building and testing steps that need to be executed in the software pipelines are increasingly complicated.&lt;/p&gt;

&lt;p&gt;Maintaining the pipeline and debugging the issues that caused it to fail can be complex, sometimes taking days to resolve everything—especially if you have to scroll through pages in the GitHub Workflow logs.&lt;/p&gt;

&lt;p&gt;Foresight’s system monitoring ensures that you won’t have to search through an ocean of GitHub logs. Foresight’s highlight dashboard allows for quick troubleshooting by indicating which workflow has a problem. Moreover, Foresight process traces allow you to easily see which step in the workflow is problematic.&lt;/p&gt;

&lt;p&gt;In this article, we’ll look at how Foresight can help you quickly fix problematic workflows, especially when integrating Foresight into your existing GitHub Enterprise environment.&lt;/p&gt;

&lt;p&gt;The best way to learn about Foresight’s features, easy integration with GitHub Enterprise, and the powerful capabilities you get when integrating them is to implement GitHub workflows for a real-world application.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Demo Application
&lt;/h2&gt;

&lt;p&gt;As an example, we will implement a  &lt;a href="https://github.com/cuongld2/thundra-movie-management-backend"&gt;blog management application&lt;/a&gt;  using Node.js with Express as the backend framework and MongoDB Atlas as the cloud database. The application will have CRUD (create, read, update, delete) APIs for managing the application’s users and blogs.&lt;/p&gt;

&lt;p&gt;First, go to Mongo Atlas to create a new database that has three collections as: posts, revoked tokens, and users.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ywNVCdwS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uu27mmmzr9dxxhax31ef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ywNVCdwS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uu27mmmzr9dxxhax31ef.png" alt="Image description" width="295" height="387"&gt;&lt;/a&gt;&lt;br&gt;
Figure 1: Mongo Atlas database creation&lt;/p&gt;

&lt;p&gt;Then, cloning the application to your local machine, all you need to do is change the database configuration string in the config/db.js file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; `module.exports = {
    MONGO_CONNECT_URL:"mongodb+srv://donaldle:cuong1990@cluster0.nolan.mongodb.net/myFirstDatabase?retryWrites=true&amp;amp;w=majority"
};` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, bring up the application locally and play with its API by running the following command:  &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; `node index.js` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Use Postman to create a new user with the API.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---g2hrvya--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4w2z6d2lm4dok02sxx4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---g2hrvya--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4w2z6d2lm4dok02sxx4.png" alt="Image description" width="660" height="876"&gt;&lt;/a&gt;&lt;br&gt;
Figure 2: Creating a new user using the application API&lt;/p&gt;

&lt;p&gt;Or create a new blog post:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8iJyvQOa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mzt0m9aqvonkkvbnmerb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8iJyvQOa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mzt0m9aqvonkkvbnmerb.png" alt="Image description" width="603" height="877"&gt;&lt;/a&gt;&lt;br&gt;
Figure 3: Creating a new blog using the application API&lt;/p&gt;

&lt;p&gt;Our blog management application is now working as expected. The next step is writing the tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing the Test
&lt;/h2&gt;

&lt;p&gt;In order to make sure the existing functionalities of the application still work after adding new features, I added some tests for the application.&lt;/p&gt;

&lt;p&gt;The tests are located in the tests directory. There are tests for authentication, user management, and blog management using Jest as a test runner as well as supertest to call HTTP requests. Below is an example of a test for an authentication API.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; `authenticate_user.test.js

const request = require("supertest")
const baseURL = "http://localhost:3000/v1"

describe("Authenticate user", () =&amp;gt; {
    const authUser={
            email:"donald.le@iamondemand.com",
            password:"tatiana"
    }
    it("should return 200", async () =&amp;gt; {
        const response = await request(baseURL).post("/auth").send(authUser);
        expect(response.statusCode).toBe(200);
    });
  });` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here, I defined the request body to send for an authentication API, which includes the user’s email and password information. After calling the API, I expect the status code that returns from the API to equal 200.&lt;/p&gt;

&lt;p&gt;Now we will run all the tests to see whether any issues arise.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; `npx jest tests` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Zh3ATpAF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tm9zew7k4u5oehhzbali.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zh3ATpAF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tm9zew7k4u5oehhzbali.png" alt="Image description" width="469" height="162"&gt;&lt;/a&gt;&lt;br&gt;
Figure 4: Tests are run with pass results&lt;/p&gt;

&lt;p&gt;As shown in Figure 4, it passed all the tests. Now we will move to creating GitHub Workflows for the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create Github Workflow
&lt;/h2&gt;

&lt;p&gt;GitHub Workflows help to automatically build the application whenever a change is applied to the GitHub repository. In addition, the API tests are executed so I will be notified if something goes wrong. It is possible to create workflow to build the application and execute the test in the GitHub agent environment for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  User management&lt;/li&gt;
&lt;li&gt;  Blog management&lt;/li&gt;
&lt;li&gt;  Authentication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub workflows are defined in the .github folder in the Git repository. For example, the blog management workflow is written as follows:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; `name: Blog Management Workflow
on: [push]
jobs:
 build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Use Node.js
        uses: actions/setup-node@v3
        with:
        node-version: '16.x'
    - run: npm ci
    - run: node index.js &amp;amp;
    - run: npx jest --config ./jest.config.json --collectCoverage --coverageDirectory="./coverage" tests/blog_management/` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here we have steps to check the code to the GitHub agent, install application dependencies, build the application, and finally execute the tests for the application. Whenever a code to the GitHub repository is updated, the workflow is automatically triggered.&lt;/p&gt;

&lt;p&gt;‍&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S7bIDOup--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i77zvyqpmnxlcj93hgzn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S7bIDOup--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i77zvyqpmnxlcj93hgzn.png" alt="Image description" width="880" height="354"&gt;&lt;/a&gt;&lt;br&gt;
Figure 6: Workflow results in GitHub Actions&lt;/p&gt;

&lt;p&gt;After successfully applying the GitHub workflows for the application, the next step is adding a new feature to the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Applying API Cache for the Application
&lt;/h2&gt;

&lt;p&gt;In order to boost the performance of the blog management APIs, especially for the APIs that are used for retrieving blog content, we can add the API caching mechanism using the express-api-cache library.&lt;/p&gt;

&lt;p&gt;Navigate to the app/route/v1/post.js, update the code for getting the blog by its ID, and get all blogs, as shown below:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; `const router = require('express').Router();
const PostController = require(APP_CONTROLLER_PATH + 'post');
let postController = new PostController();
var cacheService = require("express-api-cache");
var cache = cacheService.cache;

router.get('/', cache("10 minutes"),postController.getAll);
router.get('/:id', cache("10 minutes"),postController.get);
router.post('/', postController.create);
router.delete('/:id', postController.remove);
router.put('/:id', postController.update);

module.exports = router;` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The API for getting all blogs and for getting one blog by its ID is now cached for 10 minutes. After that time, the existing cache will be invalidated and the new cache will be applied.&lt;/p&gt;

&lt;p&gt;Pushing the new code to the GitHub repository will cause the blog management workflow to fail.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--50cbsuDZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vftu2jl57kudpfryh6de.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--50cbsuDZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vftu2jl57kudpfryh6de.png" alt="Image description" width="880" height="657"&gt;&lt;/a&gt;&lt;br&gt;
Figure 7: Recent workflow runs are failed for blog management&lt;/p&gt;

&lt;p&gt;Why did the blog management workflow fail after applying the caching mechanism for the APIs? The next step is troubleshooting this problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrate GitHub Enterprise with Foresight
&lt;/h2&gt;

&lt;p&gt;Foresight is ideal for monitoring workflows and troubleshooting tests in the application. You can easily  &lt;a href="https://docs.runforesight.com/step-by-step-guide"&gt;integrate Foresight with GitHub Enterprise&lt;/a&gt;  with just a few steps.&lt;/p&gt;

&lt;p&gt;First, search for the Foresight application in the GitHub MarketPlace apps and the Foresight app for your GitHub Enterprise.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jceXsGpR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q879qyrmb5554jam1raf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jceXsGpR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q879qyrmb5554jam1raf.png" alt="Image description" width="880" height="721"&gt;&lt;/a&gt;&lt;br&gt;
Figure 8: Foresight application in GitHub Apps Marketplace&lt;/p&gt;

&lt;p&gt;Then add permissions in order to give Foresight the capabilities to access your repositories in GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j5H1L7Y_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0of3kycozm7otu61s7b6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j5H1L7Y_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0of3kycozm7otu61s7b6.png" alt="Image description" width="880" height="628"&gt;&lt;/a&gt;&lt;br&gt;
Figure 9: Add permissions for Foresight to access GitHub repositories&lt;/p&gt;

&lt;p&gt;The final steps are adding foresight-workflow-kit-action and foresight-test-kit-action to the existing workflows along with the Foresight API key.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; `name: Blog Management Workflow
on: [push]
jobs:
 build:
    runs-on: ubuntu-latest
    steps:
    - name: Collect Workflow Telemetry
        uses: runforesight/foresight-workflow-kit-action@v1
        if: success() || failure()
        with:
        api_key: b983b8fb-e108-483a-bcd7-fdabdb16944a
    - uses: actions/checkout@v3
    - name: Use Node.js
        uses: actions/setup-node@v3
        with:
        node-version: '16.x'
    - run: npm ci
    - run: node index.js &amp;amp;
    - run: npx jest --config ./jest.config.json --collectCoverage --coverageDirectory="./coverage" tests/blog_management/
    - run: ls
    - name: Foresight test kit
        if: success() || failure()
        uses: runforesight/foresight-test-kit-action@v1
        with:
        api_key: b983b8fb-e108-483a-bcd7-fdabdb16944a
        test_format: JUNIT
        test_framework: JEST
        test_path: junit.xml
        coverage_format: COBERTURA/XML
        coverage_path: ./coverage/cobertura-coverage.xml` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We should now be able to capture the workflow and test results from Foresight.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JHIqytXT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8mzfl286tcyl402roav.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JHIqytXT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8mzfl286tcyl402roav.png" alt="Image description" width="398" height="489"&gt;&lt;/a&gt;&lt;br&gt;
Figure 10: Successfully integrate Foresight with GitHub Enterprise&lt;/p&gt;

&lt;p&gt;In the next section, we’ll look at how to debug the failed blog management workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging the Failed Test with Foresight
&lt;/h2&gt;

&lt;p&gt;Looking at the Foresight highlights, you can see that all the workflow failures are from the blog management workflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wOk3aQVy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6oxt7qrj8l52lmtxa413.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wOk3aQVy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6oxt7qrj8l52lmtxa413.png" alt="Image description" width="880" height="214"&gt;&lt;/a&gt;&lt;br&gt;
Figure 11: Foresight workflow highlights&lt;/p&gt;

&lt;p&gt;Scrolling down a little bit, you can see the overall status of the workflows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F3HJoxQf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvsyibzq6twjvj4jk46y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F3HJoxQf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvsyibzq6twjvj4jk46y.png" alt="Image description" width="880" height="430"&gt;&lt;/a&gt;&lt;br&gt;
Figure 12: Summary of workflows in Foresight&lt;/p&gt;

&lt;p&gt;Let’s check the details of this problematic workflow for more information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EetWfu2A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g57gq5vg8eekkd1edjfb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EetWfu2A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g57gq5vg8eekkd1edjfb.png" alt="Image description" width="880" height="526"&gt;&lt;/a&gt;&lt;br&gt;
Figure 13: Find out the step that cause workflow failed&lt;/p&gt;

&lt;p&gt;The step that caused the workflow to fail is the test execution.&lt;/p&gt;

&lt;p&gt;Clicking on the “Tests” column, we see that 10 lines of new codes were added although I did not add any tests to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LwraqLyp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4jahb16ropn9sdar5h2l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LwraqLyp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4jahb16ropn9sdar5h2l.png" alt="Image description" width="880" height="196"&gt;&lt;/a&gt;&lt;br&gt;
Figure 14: Check out the change impact analysis of the git repository&lt;/p&gt;

&lt;p&gt;When we click on “See changes” we see that there are 4 files that were recently updated, including the app/route/v/post.js file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zGwpJl1B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6hfhq24evnohlxa452gj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zGwpJl1B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6hfhq24evnohlxa452gj.png" alt="Image description" width="596" height="325"&gt;&lt;/a&gt;&lt;br&gt;
Figure 15: Files that have been modified&lt;/p&gt;

&lt;p&gt;By clicking on the app/route/v1/post.js file, you can see the line of code that was updated. In the post.js file, I updated 4 lines to apply a caching mechanism for the APIs to get blogs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xUxdvwm7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3frj6icxlnp4cdzrms5c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xUxdvwm7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3frj6icxlnp4cdzrms5c.png" alt="Image description" width="880" height="235"&gt;&lt;/a&gt;&lt;br&gt;
Figure 16: Details of the app/route/v1/posts.js file that has been modified&lt;/p&gt;

&lt;p&gt;Next, let’s check the processes column in the workflow detail. You can see the process details for the test execution. The process file name in this step is:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; `home/runner/work/foresight-lc-m/foresight-lc-m/node_modules/.bin/jest` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;And its process argument is:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; `"/usr/bin/env","node","/home/runner/work/foresight-lc-m/foresight-lc-m/node_modules/.bin/jest","--config","./jest.config.json","--collectCoverage","--coverageDirectory=./coverage","tests/blog_management/"‍` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mPxICOdV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vfltpr46inwdsy4ru3z2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mPxICOdV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vfltpr46inwdsy4ru3z2.png" alt="Image description" width="880" height="429"&gt;&lt;/a&gt;&lt;br&gt;
Figure 17: Processes details captured by Foresight&lt;/p&gt;

&lt;p&gt;Navigating to the “metrics” tab, you can see the metrics for CPU, memory, network, and disk.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2X1L_gki--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3hkh6x2k6o45ggucsxwk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2X1L_gki--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3hkh6x2k6o45ggucsxwk.png" alt="Image description" width="880" height="218"&gt;&lt;/a&gt;&lt;br&gt;
Figure 18: CPU metrics for the current workflow capture&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XIexXqtq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2p9h86r5kovytenvkk3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XIexXqtq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2p9h86r5kovytenvkk3.png" alt="Image description" width="880" height="214"&gt;&lt;/a&gt;&lt;br&gt;
Figure 19: Memory metrics for the current workflow capture&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MPNJhPUN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xgifqlet261xk48xdh19.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MPNJhPUN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xgifqlet261xk48xdh19.png" alt="Image description" width="880" height="216"&gt;&lt;/a&gt;&lt;br&gt;
Figure 20: Memory metrics for the current workflow capture&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BiFIxfNg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eg8ezar6g5h7l08zuwwv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BiFIxfNg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eg8ezar6g5h7l08zuwwv.png" alt="Image description" width="880" height="217"&gt;&lt;/a&gt;&lt;br&gt;
Figure 21: Disk metrics for the current workflow capture&lt;/p&gt;

&lt;p&gt;Comparing the current network metrics to the previous network metrics of this workflow, you can see the difference in network IORx Mb value. The current network metric is only 7 MB, whereas in the previous network metrics the value was 9 MB.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--36mdts4b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rbdl9fymen12v2qz5co0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--36mdts4b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rbdl9fymen12v2qz5co0.png" alt="Image description" width="880" height="216"&gt;&lt;/a&gt;&lt;br&gt;
Figure 22: Network metrics for the previous workflow capture&lt;/p&gt;

&lt;p&gt;This makes sense because I already applied the caching mechanism for the APIs, so the API for getting blog content does not directly call the MongoDB to get the blog value; it only calls the caching content.&lt;/p&gt;

&lt;p&gt;Let’s go to the test runs to see the details for every step in the test.&lt;/p&gt;

&lt;p&gt;For the blog management workflow, we have two test suites. The failed one is “Update existing blog.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fOrtakPX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlr8tb5olfed6j9rcvuq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fOrtakPX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlr8tb5olfed6j9rcvuq.png" alt="Image description" width="880" height="433"&gt;&lt;/a&gt;&lt;br&gt;
Figure 23: Determining the problematic test suite&lt;/p&gt;

&lt;p&gt;Click on “Update existing blog” to see the details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZXzQSSZQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/plmh2b061rocmhxb2j7j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZXzQSSZQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/plmh2b061rocmhxb2j7j.png" alt="Image description" width="880" height="257"&gt;&lt;/a&gt;&lt;br&gt;
Figure 24: Determining why the test failed&lt;/p&gt;

&lt;p&gt;You can see that the test failed, because the expected value is “A new testing blog afterUpdateBlog,” whereas the received value is “A new testing blog beforeUpdateBlog.”&lt;/p&gt;

&lt;p&gt;Next, check the test file for more details.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ``beforeAll(async () =&amp;gt; {
    // Get user token
    const response = await request(baseURL).post("/auth").send(authUser);
    expect(response.statusCode).toBe(200);
    userToken=response.body.data.token
    const responsePut = await request(baseURL).put(`/posts/${blogId}`).set("Authorization","JWT " + userToken).send(beforeUpdateBlog);
    expect(responsePut.statusCode).toBe(200);
    })
    it("should return 200", async () =&amp;gt; {
    const responseGetBefore = await request(baseURL).get(`/posts/${blogId}`).set("Authorization","JWT "+userToken);
    expect(responseGetBefore.statusCode).toBe(200);
    expect(responseGetBefore.body.data.title).toBe(beforeUpdateBlog.title);

    const response = await request(baseURL).put(`/posts/${blogId}`).set("Authorization","JWT "+userToken).send(afterUpdateBlog);
    expect(response.statusCode).toBe(200);
    expect(response.body.data.title).toBe(afterUpdateBlog.title);

    const responseGet = await request(baseURL).get(`/posts/${blogId}`).set("Authorization","JWT "+userToken);
    expect(responseGet.statusCode).toBe(200);
    expect(responseGet.body.data.title).toBe(afterUpdateBlog.title);
    });`` 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the test for updating an existing blog, I have to change the step for the blog content to the initial value as “A new testing blog beforeUpdateBlog,” and then call to get the API blog to confirm the blog has been updated. Finally, I update the blog content to “A new testing blog afterUpdateBlog,” then call the get API blog to confirm.&lt;/p&gt;

&lt;p&gt;The first time I call the get-API blog to confirm, the request is made to the MongoDB database. Its value will be cached because I implemented the caching mechanism. The second time when I call the get-API blog to confirm, the request is not made to the MongoDB database, but calls the cached value from the previous step. The cached value from the previous step is “A new testing blog beforeUpdateBlog,” even though I expected it to be “A new testing blog afterUpdateBlog.”&lt;/p&gt;

&lt;p&gt;This is why the test for “Update existing blog” and the blog management workflow both failed.&lt;/p&gt;

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

&lt;p&gt;Implementing workflows for automatically building and testing your web application is difficult; maintaining them over time is even harder. Without the right support tools, you could end up spending most of your time debugging failed workflows rather than implementing new features for your application that actually fulfill the business requirements.&lt;/p&gt;

&lt;p&gt;Foresight does all the heavy lifting for debugging, tasks are already done. By simply looking at the Foresight highlights and process traces, you’ll know exactly which part of the workflow has problems so you can address them. This is even easier if you’re already using GitHub Enterprise: Foresight, now a partner with GitHub, provides the support you need when integrating with GitHub Enterprise.&lt;/p&gt;

&lt;p&gt;Save yourself the frustration of scrolling repeatedly through GitHub logs for debugging tasks! Check out  &lt;a href="https://foresight.docs.thundra.io/"&gt;Foresight&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>observability</category>
      <category>devops</category>
      <category>javascript</category>
      <category>github</category>
    </item>
    <item>
      <title>Enhancing Software Change Impact Analysis</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Mon, 12 Sep 2022 14:19:25 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/enhancing-software-change-impact-analysis-c3l</link>
      <guid>https://dev.to/ismailegilmez4/enhancing-software-change-impact-analysis-c3l</guid>
      <description>&lt;p&gt;A comprehensive test suite is part of modern software development best practices. Unit tests, integration tests, end-to-end tests, and many others make sure your system keeps working when you need to change the implementation.&lt;/p&gt;

&lt;p&gt;But over the lifetime of a software project, you can end up with hundreds of such tests, and every test you add can gradually slow down your CI/CD pipeline. You have high standards for software quality, but with all these tests, your development velocity goes down the drain. How can you get both: quick changes and high quality?&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does Change Impact Analysis Help?
&lt;/h2&gt;

&lt;p&gt;Change Impact Analysis is one solution to this problem. The goal of it is to minimize the number of tests required to run for a specific change. When you have a massive suite of tests, change impact analysis helps you organize and track which test impacts which source files. Later, when you change one or more of these source files, you can take the change impact analysis list and check which parts of your test suite are impacted by the changes you made.&lt;/p&gt;

&lt;p&gt;With change impact analysis, you only run the tests that matter, save time in your CI/CD pipeline, and get results quickly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing Change Impact Analysis for Node.js
&lt;/h2&gt;

&lt;p&gt;Let’s find out how we can set up change impact analysis for Node.js. For this project, we’ve created  &lt;a href="https://github.com/ismailegilmez4/change-impact-analysis"&gt;&lt;strong&gt;an example repository on GitHub&lt;/strong&gt;&lt;/a&gt;  that you can clone locally and use as a reference.&lt;/p&gt;

&lt;p&gt;This example project is an API that uses the Express framework. It consists of three routes, each having its file and four test files—one for every route and one with tests for two routes.&lt;/p&gt;

&lt;p&gt;The unit tests are implemented with the Jest testing framework, which supports code coverage output. This output allows us to check which test file affects which source file.&lt;/p&gt;

&lt;p&gt;src/&lt;br&gt;&lt;br&gt;
index.js&lt;br&gt;&lt;br&gt;
route-a.js&lt;br&gt;&lt;br&gt;
route-b.js&lt;br&gt;&lt;br&gt;
route-c.js&lt;br&gt;&lt;br&gt;
&lt;strong&gt;tests&lt;/strong&gt;/&lt;br&gt;&lt;br&gt;
route-a.js&lt;br&gt;&lt;br&gt;
route-b.js&lt;br&gt;&lt;br&gt;
route-c.js&lt;br&gt;&lt;br&gt;
route-a-c.js&lt;/p&gt;
&lt;h2&gt;
  
  
  Running all tests
&lt;/h2&gt;

&lt;p&gt;If you run the  &lt;code&gt;test:all&lt;/code&gt;  you will execute all tests in the  &lt;code&gt;__tests__&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ npm run test:all&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;This is the default behavior, and in our example, this is no problem. But, over time, it could grow slower. That’s why we have to use change impact analysis to find out which test file is concerned with which source file.&lt;/p&gt;
&lt;h2&gt;
  
  
  Analyzing Change Impact
&lt;/h2&gt;

&lt;p&gt;To analyze change impact, we have to complete the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Check which test files exist&lt;/li&gt;
&lt;li&gt; Run each test file on its own&lt;/li&gt;
&lt;li&gt; Check the resulting code coverage of each test run&lt;/li&gt;
&lt;li&gt; Write down which source files the test touched&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To find out what source files were touched, you need to configure Jest to output code coverage data; in this project, that’s done inside the  &lt;code&gt;package.json&lt;/code&gt;  file.&lt;/p&gt;

&lt;p&gt;This is the code for the Jest configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "jest": {
  "collectCoverage": true,
  "coverageDirectory": "coverage",
  "coverageReporters": [
    "json"
  ]
},
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the  &lt;code&gt;scripts&lt;/code&gt;  directory is a  &lt;code&gt;init-tia.js&lt;/code&gt;  file, which implements these steps. Let’s look at the important parts of this file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const testFileNames =
  fs.readdirSync("./__tests__")
const testImpact = {}
for (const testFileName of testFileNames) {
  await jest.run(testFileName)
  const absoluteFilePaths = Object.keys(
    JSON.parse(
      fs.readFileSync(
        "./coverage/coverage-final.json"
      )
    )
  )
  testImpact[testFileName] =
    absoluteFilePaths.map((f) =&amp;gt;
      f.replace(process.cwd(), ".")
    )
}
fs.writeFileSync(
  "./scripts/tia.json",
  JSON.stringify(testImpact, null, 2)
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script gets all of the test files and loops through them. Each loop iteration executes Jest with just one test file and reads the disk’s coverage report. Next, the script adds an entry to the change impact analysis list that contains the test file name and the corresponding source file names. Before writing the source file&lt;/p&gt;

&lt;p&gt;names, it transforms the file’s absolute path into a relative one.&lt;/p&gt;

&lt;p&gt;Finally, the script writes the change impact analysis list as JSON to disk, so a future execution of the test suite can use it as a filter. The list looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "route-a-c.js": [
    "./src/route-a.js",
    "./src/route-c.js"
  ],
  "route-a.js": [
    "./src/route-a.js"
  ],
  "route-b.js": [
    "./src/route-b.js"
  ],
  "route-c.js": [
    "./src/route-c.js"
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can see here that most tests only affect one source file, but the&lt;code&gt;route-a-c.js&lt;/code&gt;  test affects two source files. As a result, the  &lt;code&gt;tia.json&lt;/code&gt;  file must be checked into the source control and updated every time the test suite changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Only Impacted Tests
&lt;/h2&gt;

&lt;p&gt;Now, we can run only essential tests. But let’s look at the  &lt;code&gt;run-tia.js&lt;/code&gt;  script before we run it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const requiredTestFiles = []
  const allChangedFiles = JSON.parse(process.argv[2])
  const { FORESIGHT_JEST_ARGUMENTS } = process.env
  if (FORESIGHT_JEST_ARGUMENTS) {
    const foresightArgs =
      FORESIGHT_JEST_ARGUMENTS.split(" ")
    requiredTestFiles.push(...foresightArgs)
  }
  const changedSourceFiles = allChangedFiles
    .filter((file) =&amp;gt; /src\/.*.js/gi.test(file))
    .map((file) =&amp;gt; "./" + file)
  for (const sourceFile of changedSourceFiles)
    for (const testFile of Object.keys(tia))
      if (tia[testFile].includes(sourceFile))
        requiredTestFiles.push(testFile)
  if (requiredTestFiles.length &amp;lt; 1)
    return console.log(
      "No tests cover the changed files. Aborted."
    )
await jest.run(requiredTestFiles)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The idea here is that the script will get a list of changed files from the CI/CD pipeline as an argument. It will then check which tests cover the files and pass the tests to the Jest library. This way, only tests that are related to the changes will be executed.&lt;/p&gt;

&lt;p&gt;If we look at the GitHub Action definition, we can see where the changed files come from.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; steps:
  - id: files
    uses: jitterbit/get-changed-files@v1
    with:
      format: json
  - uses: actions/checkout@v2
  - name: Use Node.js $0
    uses: actions/setup-node@v2
    with:
      node-version: $0
  - name: Install dependencies
    run: npm ci
  - name: Run tests
    run: npm run test:tia -- '$'
    if: $
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The  &lt;code&gt;files&lt;/code&gt;  step will gather all files changed in the push or PR that triggered the action. The  &lt;code&gt;Run tests&lt;/code&gt;  step will only execute if a file in the  &lt;code&gt;src&lt;/code&gt;  directory has changed and passed a JSON array of these to our  &lt;code&gt;test:tia&lt;/code&gt;  script.&lt;/p&gt;

&lt;p&gt;To run the tests, make a change inside a file in the src directory, commit it, and push it to GitHub. GitHub Actions will start automatically right after the push.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting More Insight with Foresight
&lt;/h2&gt;

&lt;p&gt;It’s nice to filter out tests that aren’t needed, but we also want to make the most of the tests we keep and continue to execute—and there’s no better tool for optimizing your tests than Foresight. It can be integrated simply by installing Foresight's GitHub app on the GitHub Marketplace and changing the “Run tests” step in the  &lt;code&gt;run-test-tia.yml&lt;/code&gt;  file.&lt;/p&gt;

&lt;p&gt;First,  &lt;a href="https://foresight.thundra.io/signup"&gt;&lt;strong&gt;create a Foresight account&lt;/strong&gt;&lt;/a&gt;  and connect your pipeline by simply installing the GitHub app. After installing the app successfully, you will see the project creation and repositories screen. You should name your first project and select the repositories you want to monitor.&lt;/p&gt;

&lt;p&gt;In order to gain insights about our tests such as grouping tests, test suites along with their logs, screenshots, and more to understand why even the most complex integration test failed; we need to update our YAML file with Foresight's report uploader step and troubleshoot our test failures easily.&lt;/p&gt;

&lt;p&gt;We can change the GitHub action for our tests to use the  &lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;strong&gt;Foresight integration&lt;/strong&gt;&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;steps:
      - id: files
        uses: jitterbit/get-changed-files@v1
        with:
          format: json
      - uses: actions/checkout@v2
      - name: Use Node.js $0
        uses: actions/setup-node@v2
        with:
          node-version: $0
      - name: Install dependencies
        run: npm ci
    - name: Foresight Test Report Uploader
          if: always()
      uses: actions/upload-artifact@v2
      with:
        name: test-result-jest
        path: ./target
     - name: Run TIA tests
        run: "npm run test:tia -- '$'"
        if: $
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it. Now we can change a file in the src directory again, commit it, and push it to GitHub to see if everything is working.&lt;/p&gt;

&lt;p&gt;It will take a few minutes to get the results in Foresight, but after that push, you can  &lt;a href="https://foresight.thundra.io/projects/start"&gt;&lt;strong&gt;go to the Foresight web console&lt;/strong&gt;&lt;/a&gt;, open your project, and wait for the results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.runforesight.com/"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  provides full visibility and deep insights into the health and performance of your tests and CI/CD pipelines. You can assess the risk of changes, resolve bottlenecks, reduce build times, and deliver high-quality software at speed.&lt;/p&gt;

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

&lt;p&gt;Big test suites give us peace of mind when modifying our code, but they also slow down the delivery of new releases—the bigger the test suite, the slower the pipeline. With change impact analysis, we have a solution to that problem. If we only run tests related to our changes, we can save time while still checking the crucial parts of our code.  &lt;a href="https://foresight.thundra.io/signup"&gt;&lt;strong&gt;Sign up for Foresight to improve your test runtimes&lt;/strong&gt;&lt;/a&gt;  and gain insight into your tests.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Save the date! 🕊️&lt;br&gt;
On the 28th of September, we are launching Foresight on Product Hunt 🎉🍻&lt;br&gt;
&lt;strong&gt;Take your seat before we launch on&lt;/strong&gt; &lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;strong&gt;Product Hunt&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;💜&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" alt="" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>devops</category>
      <category>cloud</category>
      <category>cicd</category>
    </item>
    <item>
      <title>The Known and Unknown Costs of CI Testing</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Mon, 12 Sep 2022 13:59:18 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/the-known-and-unknown-costs-of-ci-testing-e7p</link>
      <guid>https://dev.to/ismailegilmez4/the-known-and-unknown-costs-of-ci-testing-e7p</guid>
      <description>&lt;p&gt;The purpose of software testing is to reduce the risk of negative effects resulting from unexpected behaviors of your application at the lowest possible cost. So let’s talk about the various costs associated with testing code in cloud applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Is Continuous Integration (CI) Testing Important?
&lt;/h2&gt;

&lt;p&gt;Testing during the continuous integration phase of the application development life cycle is a lifesaver: It enables you to fix problems even before they occur, which prevents production issues that would affect your end-users, customers, or your business. Additionally, testing lets you speed up the continuous delivery process and reduce integration failures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known Costs of CI Testing
&lt;/h2&gt;

&lt;p&gt;Issues in production can be extremely costly, but no one wants their end users to be affected by issues in their applications. That’s why we use software tests: to detect errors, defects, and bugs as early in the development cycle as possible to minimize the cost and create a better experience for end-users. However, tests do have some known costs, such as the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Building cost&lt;/strong&gt;: This is the combined cost of time, money, and effort being spent to create tests specific to your applications. It also includes the cost of making your system available for running tests.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Running cost&lt;/strong&gt;: The cost of the compute resources during the runtime duration of the tests.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Sustainability cost&lt;/strong&gt;: The cost of changes needed to adopt the tests to the software alteration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Software teams spend many man-hours and cloud resources on running their tests, meaning the cost of software tests should be viewed as just another cost item in the software development process.&lt;/p&gt;

&lt;p&gt;It is possible to reduce execution costs in several ways. For example, you can decide to only run tests that affect the code that has changed, uncouple tests that overlap with each other, replace slow input data with mocks or test doubles to speed up testing times, or stop a test suite right after it proves there is problematic feedback in order to apply the fail-fast system.&lt;/p&gt;

&lt;p&gt;During different runs, some tests can both fail and pass with exactly the same codebase. These are known as flaky tests, which are more costly than others because they increase the risk of a crash or slowdown of applications while also introducing ambiguity. If flaky tests are not dealt with in the organization, then developers start to feel the ramifications of ignoring them.&lt;/p&gt;

&lt;p&gt;Since  &lt;a href="https://www.runforesight.com/blog/fixing-flaky-tests-the-fast-lane-to-success"&gt;&lt;strong&gt;flaky tests&lt;/strong&gt;&lt;/a&gt;  have a high potential to badly affect your end users, you should measure and reduce them to a minimum when possible. Tests can be flaky up to a certain degree in cases such as I/O operations that are required to run. In these cases, rewriting tests to prevent flakiness can be very costly (and also complex) –yet also necessary. To prevent or minimize flakiness, you can add retries or strengthen the I/O operations against transient failures to prevent or minimize the flakiness. Additionally, you can accelerate the speed of your tests by recording and replaying the traffic using mocks for external dependencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unknown Costs of CI Testing
&lt;/h2&gt;

&lt;p&gt;Testing will never be able to tell us that an application is 100% reliable because testing is about managing risk. The coverage of traditional tests should not be a target that an engineering team focuses on, as it cannot indicate the quality of service but instead only calculates how extensive unit tests are.&lt;/p&gt;

&lt;p&gt;The chart below reflects the common problems encountered during software testing. Long-running tests, flaky tests, and tests that fail can result from unknown causes and can therefore lead to unknown costs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cEJ83XbT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b421beced5b659593e2871_Screen%2520Shot%25202022-06-23%2520at%252011.17.50.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cEJ83XbT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b421beced5b659593e2871_Screen%2520Shot%25202022-06-23%2520at%252011.17.50.png" alt="" width="880" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How to Optimize Cost&lt;/p&gt;

&lt;p&gt;One way to optimize a system is by balancing execution cost with feedback time. For example, if we reduce the execution cost, then it will take us longer to determine whether or not our work has been successful.&lt;/p&gt;

&lt;p&gt;If you run tests less frequently for every code commit, then the gaps in the test execution map will increase. To ensure a project's success, you need to strike a balance between the tolerance of risk and the cost of testing.&lt;/p&gt;

&lt;p&gt;While some parts of an application may need to be tested thoroughly, others may not need to be tested as extensively. You should always think about the best way to test your scenarios, such as new features, bug fixes, or dependency failure handlers, to keep testing costs as low as possible.&lt;/p&gt;

&lt;p&gt;For example: Would it be enough to use a unit test? Is it okay to use  &lt;a href="https://www.runforesight.com/blog/difficult-mock-life"&gt;&lt;strong&gt;test doubles and mocked dependencies&lt;/strong&gt;&lt;/a&gt;  in tests, or should tests run against real cloud resources? Should applications be instrumented and undergo canary deployment in production in order to make tests flawless?&lt;/p&gt;

&lt;p&gt;A developer or a development team should evaluate these questions to determine if there is a valid enhancement on a case-by-case basis. Moreover, developers should be familiar with a wide range of testing methodologies and be confident enough to choose one or more of them to ensure the cost and performance effectiveness of tests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SmpLi_Oo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b42113dd0b243ae6494640_The%252520Known%252520and%252520Unknown%252520Costs%252520of%252520CI%252520Testing-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SmpLi_Oo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b42113dd0b243ae6494640_The%252520Known%252520and%252520Unknown%252520Costs%252520of%252520CI%252520Testing-1.png" alt="Tests which failed and succeeded" width="880" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Do We Plan for Tests That May or May Not Pass?
&lt;/h2&gt;

&lt;p&gt;One way that we can test for unknown problems is by introducing random data to an application. Randomized testing, as it is sometimes called, introduces data that the developer has not generated intentionally and utilizes existing tests for expected behaviors. See the chart below for more information:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QxwAjcqm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b4211472171b398b78ea4b_The%252520Known%252520and%252520Unknown%252520Costs%252520of%252520CI%252520Testing.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QxwAjcqm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b4211472171b398b78ea4b_The%252520Known%252520and%252520Unknown%252520Costs%252520of%252520CI%252520Testing.png" alt="Chart to utilize existing tests" width="880" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.runforesight.com/blog/testing-tips-for-todays-distributed-cloud-environments"&gt;&lt;strong&gt;When testing our application&lt;/strong&gt;&lt;/a&gt;, our goal is to move as much information to the “Known Knowns” quadrant as we possibly can. On the other hand, every change we make in our application invalidates the information in the "Known Knowns" quadrant.&lt;/p&gt;

&lt;p&gt;Testing allows us to move information from the "Known Unknowns" to "Known Knowns," because we know which questions we should ask in the "Known Unknowns" quadrant. So, when we run tests with those questions in mind, we have a good chance of getting our answers.&lt;/p&gt;

&lt;p&gt;This can be done in a quick, automated way. Some examples of questions you might ask are, "Will this function provide the expected outcome when these specific arguments are provided?", "Does my service return an HTTP 400 status when given an invalid payload?", or "Does the UI show me an error message when I enter a password that doesn’t match what is provided on sign-up?"&lt;/p&gt;

&lt;p&gt;"Unknown Unknowns” are the issues that become apparent only when they arise, because we are not aware of these issues and potentially, we may not easily understand them.&lt;/p&gt;

&lt;p&gt;We cannot predict which components of our application will fail without knowing what can actually fail. The best solution to deal with this problem is to have adequate instrumentation and  &lt;a href="https://www.runsidekick.com/blog/debugging-tips-for-developers-on-intellij-idea"&gt;&lt;strong&gt;good debugging tools&lt;/strong&gt;&lt;/a&gt;  in place.&lt;/p&gt;

&lt;p&gt;It's always a good idea to go for the least costly tests to avoid regressions and to move information to the "Known Unknowns" quadrant, especially if the root cause is not just a transitory operational issue, but something that we are likely to encounter again in the future.&lt;/p&gt;

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

&lt;p&gt;As organizations move to the cloud and adopt Agile methodologies and DevOps, developers are increasingly responsible for more tasks. No longer dedicated QA, developers write more tests, are responsible for operating services (YBIYRI), and are expected to do more for testing, security, etc.&lt;/p&gt;

&lt;p&gt;The most efficient way to build resilient, performing, simple/easy to debug, and easy-to-maintain applications is by testing your applications. Testing enables organizations to ship code faster, but when you don’t do it carefully, it can be costly in many ways. Modern applications are distributed, dynamic, and remote. As a result, new failure modes have entered the scene and they are making work increasingly difficult to anticipate and troubleshoot.&lt;/p&gt;

&lt;p&gt;The best way to avoid software faults is to use more than one quality control strategy. In order to accurately identify, diagnose, and correct problems more effectively, it's important to review traditional testing techniques and adopt new ones for every stage of the development life cycle. Testing will not be an effective means of low-defect software production until this is implemented.&lt;/p&gt;

&lt;p&gt;At every testing stage of every software development project, it’s highly potential to face “Unknown Unknowns.” You need to have the proper tooling in place to immediately tame those monsters. Foresight enables you to monitor your CI pipelines, and debug and troubleshoot your tests.&lt;/p&gt;

&lt;p&gt;Detecting the root causes of erroneous tests and understanding the reasons behind slow builds is easy with Foresight.  &lt;a href="https://foresight.thundra.io/signup"&gt;&lt;strong&gt;Sign up for Foresight&lt;/strong&gt;&lt;/a&gt;  and try it yourself.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Save the date! 🕊️&lt;br&gt;
On the 28th of September, we are launching Foresight on Product Hunt 🎉🍻&lt;br&gt;
&lt;strong&gt;Take your seat before we launch on&lt;/strong&gt; &lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;strong&gt;Product Hunt&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;💜&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" alt="" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>testing</category>
      <category>cicd</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Difficult Mock Life</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Mon, 12 Sep 2022 13:57:46 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/difficult-mock-life-o16</link>
      <guid>https://dev.to/ismailegilmez4/difficult-mock-life-o16</guid>
      <description>&lt;h2&gt;
  
  
  What Is Mocking?
&lt;/h2&gt;

&lt;p&gt;Mocking is a popular and widely used approach in unit testing to handle dependencies. However, this method has both an upside and a downside, so it’s important to compare these pros and cons to determine if the costs will outweigh the benefits. Let’s take a closer look at mocking.&lt;/p&gt;

&lt;p&gt;Mocking is a great way to isolate tests from external factors, like databases or web services. However, mocking also adds an extra layer of complexity to our codebase that must be carefully considered.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BBZ-wUqu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b2f361325ec8cc94ca9b87_Hard%252520Mock%252520Life-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BBZ-wUqu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b2f361325ec8cc94ca9b87_Hard%252520Mock%252520Life-1.png" alt="" width="880" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mocking is also a useful way to replace dependencies with stand-ins in your unit test. The stand-ins are often called “mocks,” and they allow the unit test to run smoothly without invoking the real dependency.&lt;/p&gt;

&lt;p&gt;Mocking can be achieved in various ways. The most popular approach is to create a mock object that implements the interface of the dependency, like so:&lt;/p&gt;

&lt;p&gt;`public class LoginServiceTest {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Test
public void happyPathLogin() {
    // Mock a User object
    IUser sampleUser = mock(IUser.class);
    when(user.passwordCheck(anyString())).thenReturn(true);

    // Mock database connection to find the mocked user
    IUserDatabase database = mock(IUserDatabase.class);
    when(database.findUserByEmail(anyString())).thenReturn(sampleUser)

    LoginService service = new LoginService();
    service.login("mail@example.com", "password");

    verify(user, times(1)).isLoggedIn(true);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}` &lt;/p&gt;

&lt;p&gt;In the example above, the class mocks a user object and a database connection to satisfy a successful login event when invoked with certain parameters.&lt;/p&gt;

&lt;p&gt;Mocks originally generated from “test doubles,” but mocking is more widely known because it became a generic term among developers. A mock stands for the real production code in a unit test and should be able to produce assertions about the manipulations made by the test subject during the test run.&lt;/p&gt;

&lt;p&gt;When mocking dependencies, it’s crucial to consider how much time and effort it will take to set up the mocks in tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Mocking
&lt;/h2&gt;

&lt;p&gt;To put it simply, you basically create a living space for the bugs in your application when you mock dependencies – meaning you override the business logic with your mocked classes where coupling with the test subject may vary.&lt;/p&gt;

&lt;p&gt;There are three issues to consider while using mocks in your unit tests:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; The complexity of your architectures can increase.&lt;/li&gt;
&lt;li&gt; Refactoring your code becomes more difficult.&lt;/li&gt;
&lt;li&gt; The likelihood that bugs will be hidden behind the curtain increases.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1. Reduced Simplicity
&lt;/h3&gt;

&lt;p&gt;Mocking can reduce the simplicity of architecture design by coupling units together more tightly and by raising the difficulty level for making changes, which comes with a cost. When the system is harder to change, the design slowly starts to deteriorate – and refactoring becomes a hassle for developers.&lt;/p&gt;

&lt;p&gt;Mocked resources add additional coupling between the test and the source code because mocks don’t just change the state or what is returned – they assert how an object behaves toward its collaborators. Additionally, since the internals of how the class interacts with its mocked resources are exposed, tests produce encapsulation. Thus, the test would fail if the interaction between a class and the mocked resources is changed when refactoring.&lt;/p&gt;

&lt;p&gt;Moreover, an exception script has to be written in a mock-based unit test. To do that, you need to have a deep knowledge of the interaction between your application and its dependencies, which are generally cloud resources. It’s not enough to have knowledge of the sequence of calls – you also need to know about the data that is both inbound and outbound.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Difficult Refactoring
&lt;/h3&gt;

&lt;p&gt;Most of the time, refactoring results in quick solutions when you look at your code from a divide-and-conquer point of view. You can see positive changes in many areas as the code quality increases.&lt;/p&gt;

&lt;p&gt;But mocks inhibit refactoring because of the coupling they add between the test and the source code. If you are making an Interaction-Based Test, then coupling will increase between the test and the source code.&lt;/p&gt;

&lt;p&gt;In a red-green-refactor cycle, it’s essential to see the green light before attempting refactoring. And it is what we expect to be in the “green” state after the refactoring, too. But if you mock your cloud resources for your unit tests, this expectation may fail because the mocks test both the internal and external behavior of the code.&lt;/p&gt;

&lt;p&gt;This always happens to me whenever I decide to use mocks for small jobs. I have a UserSave class, which calls a database cloud resource and a notification service cloud resource. To make things quick and easy in my local environment, I mocked those dependencies as UserDatabase and UserNotification classes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tJmU6coi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b2f3629dd4f73c9bd21b44_Hard%252520Mock%252520Life-2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tJmU6coi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b2f3629dd4f73c9bd21b44_Hard%252520Mock%252520Life-2.png" alt="" width="675" height="993"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But then I realized that the design would be simplified if I refactored the application in the latter way, as shown in the image above. The functionality of my classes did not change, but the external behavior completely changed. So after this refactoring, many of the UserSave class unit tests have failed.&lt;/p&gt;

&lt;p&gt;When you use mocks, your test code knows the internal requests and responses of the test subject classes. And that’s the reason why mocking prevents refactoring – because it tightly couples the production code with the test code.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Bugs Can Easily Hide
&lt;/h3&gt;

&lt;p&gt;A good developer knows that mocking is a double-edged sword: It can be used to save time when testing the logic of your code, but there are some pitfalls that should not be ignored. The problem with mocking is that you are overriding the logic of the mocked class. The real logic gets hidden behind the scenes, which is where bugs just love to live.&lt;/p&gt;

&lt;p&gt;Consider this: The mock may have attributes, methods, or arguments that the real object doesn’t have. Also, the return values can be different. Your unit tests run with mocked resources, and you decide the return values you will get.&lt;/p&gt;

&lt;p&gt;On the other hand, real cloud resources may return different and/or unexpected values. The mock’s side effects and behavior may differ from those of the real objects. For example, when your real cloud resources raise an exception, the mocks might fail instead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--URgC3Jda--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b2f361bbf58d5289b3492d_Hard%252520Mock%252520Life.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--URgC3Jda--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b2f361bbf58d5289b3492d_Hard%252520Mock%252520Life.jpeg" alt="" width="880" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Photo by&lt;/em&gt; &lt;a href="https://unsplash.com/@thomasbormans?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;&lt;strong&gt;&lt;em&gt;Thomas Bormans&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;  &lt;a href="https://unsplash.com/s/photos/hide?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;&lt;strong&gt;&lt;em&gt;Unsplash&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can essentially create a mock “jungle” when mocking the interactions between the test subject application and the cloud resources. Mocking all of the classes makes you create mocks that return other mocks. If the data pathway is long and complex, then you have to mock all the way down from end to end.&lt;/p&gt;

&lt;p&gt;This creates a perfectly ideal habitat for “cute” little bugs because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Mocks must be updated as frequently as the application code changes, therefore adding a maintenance burden to the application. If you don’t update the mocks, then you open the door for bugs.&lt;/li&gt;
&lt;li&gt;  Integration-Based Testing makes refactoring difficult because the mocking frameworks introduce tighter couplings between test and source code. This may lead to bugs after refactoring.&lt;/li&gt;
&lt;li&gt;  Most of the errors and bugs can be hosted as a result of Integration-Based Testing. Problems arise from coupling introduced by poor implementation in unit tests, such as complex constructors, mocking value objects, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When to Mock
&lt;/h2&gt;

&lt;p&gt;This isn’t to say that mocking is bad or harmful. But it’s best to mock dependencies only when you really have to, not just because you can.&lt;/p&gt;

&lt;p&gt;It is a good practice to demarcate groups of objects with mocks using state-based tests internally.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--627_XosF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b2f362be7e9d706ffa2bb6_Hard%252520Mock%252520Life.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--627_XosF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b2f362be7e9d706ffa2bb6_Hard%252520Mock%252520Life.png" alt="" width="563" height="729"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Robert Cecil Martin, colloquially called "Uncle Bob," says in  &lt;a href="https://blog.cleancoder.com/uncle-bob/2014/05/14/TheLittleMocker.html"&gt;&lt;strong&gt;his blog&lt;/strong&gt;&lt;/a&gt;: “Only use a mock (or test double) when testing things that cross the dependency inversion boundaries of the system.”&lt;/p&gt;

&lt;p&gt;First of all, if I really need a mock, I write it myself rather than using a mocking framework. I believe the simplicity of the code is only minimally affected by doing this. When I need to write test doubles for large interfaces or third-party libraries, however, then I prefer to use the mocking frameworks.&lt;/p&gt;

&lt;p&gt;And also, when I need to mock a resource, I first try to mock at the highest level possible in the class hierarchy diagram. To be more specific, I tend not to use a mock if a spy will get the job done. Similarly, I do not use a spy if a stub will work, and so on. The idea behind this approach is that the lower you go in the class hierarchy of mocks, the more knowledge duplication you create.&lt;/p&gt;

&lt;p&gt;We all get frustrated when our unit testing goes beyond the bearable limits in regard to time. When mocking is not used at all, the execution of the test suite can be very slow – it can even take hours. Databases, different kinds of servers, and services run thousands or millions of requests over the network, a process that is considerably slower than computer instructions.&lt;/p&gt;

&lt;p&gt;The tests are sensitive to faults in sections that are unrelated to your test subject. Such situations can be seen in many instances. For example, databases that contain extra or missing rows. Modifications can be made to the configuration files. Network timings can flicker due to an abrupt load on the hardware. Memory might be consumed by some other processes. The test suite may require special network connections that are down. The test suite may require a special execution platform, similar to the production system. And this is where we see the benefits of mocking because it can save you from such cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Efficiency Vs. Cost
&lt;/h2&gt;

&lt;p&gt;Overall, the effectiveness and the efficiency benefit of mocking are lighter than the maintenance and  &lt;a href="https://www.runforesight.com/blog/the-known-and-unknown-costs-of-ci-testing"&gt;&lt;strong&gt;development cost&lt;/strong&gt;&lt;/a&gt;. My two cents would be to consider thriftily mocking cloud resources.&lt;/p&gt;

&lt;p&gt;If you design your application architectures and find ways to test them that do not require mocking, then you should use mocks only for edge cases to test architecturally significant boundaries.&lt;/p&gt;

&lt;p&gt;Also, mocking tools might fail in your testing somewhere in the process, so it’s better to depend on them as little as possible. Another note: Writing your own mock classes will help you maintain as much control as possible, while third-party tools will limit your ability to keep control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing &amp;gt; Mocking
&lt;/h2&gt;

&lt;p&gt;Testing your software helps you reduce your costs in multiple aspects. There are  &lt;a href="https://www.runforesight.com/blog/testing-tips-for-todays-distributed-cloud-environments"&gt;&lt;strong&gt;various ways&lt;/strong&gt;&lt;/a&gt;  to test your software. Using mocked versions of the cloud resources may help you reduce complexity and cost if it is done in the right way.&lt;/p&gt;

&lt;p&gt;Overall takeaways on mocking are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  You don’t have to mock everything.&lt;/li&gt;
&lt;li&gt;  Always think about the cost of development and maintenance.&lt;/li&gt;
&lt;li&gt;  You should only mock the class that is under your own control.&lt;/li&gt;
&lt;li&gt;  Only mock tests’ relevant behaviors.&lt;/li&gt;
&lt;li&gt;  Avoid mocking value objects.&lt;/li&gt;
&lt;li&gt;  Avoid mocking complex setup or constructors.&lt;/li&gt;
&lt;li&gt;  Write your own mocks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a final call out, remember that using mocks can bring a cost advantage for testing your applications but this is more like an illusion. Because you can not oversee the cost of potential defects in your application when you deploy it to the cloud environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.runforesight.com/"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  comes into help at this point. It allows you to develop, test, and serve your application in the real cloud environment with the confidence of error detection.  &lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  provides full visibility and deep insights into the health and performance of your tests and CI/CD pipelines. When mocks work in your local but cloud resources don't act the same as mocks, you can just  &lt;a href="https://foresight.docs.thundra.io/"&gt;&lt;strong&gt;plug Foresight&lt;/strong&gt;&lt;/a&gt;  and pinpoint the issues easily.&lt;/p&gt;

&lt;p&gt;To try yourself;  &lt;a href="https://foresight.thundra.io/signup"&gt;&lt;strong&gt;sign up for your free account&lt;/strong&gt;&lt;/a&gt;, take a look at the  &lt;a href="https://foresight.docs.thundra.io/"&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;/a&gt;, and join our  &lt;a href="https://www.thundra.io/thundra-slack-invitation"&gt;&lt;strong&gt;Discord community&lt;/strong&gt;&lt;/a&gt;  for any questions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Save the date! 🕊️&lt;br&gt;
On the 28th of September, we are launching Foresight on Product Hunt 🎉🍻&lt;br&gt;
&lt;strong&gt;Take your seat before we launch on&lt;/strong&gt; &lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;strong&gt;Product Hunt&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;💜&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" alt="" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>testing</category>
      <category>cicd</category>
      <category>cloud</category>
    </item>
    <item>
      <title>(Series #2) Building a Test Automation Team</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Mon, 12 Sep 2022 13:56:08 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/series-2-building-a-test-automation-team-2i3m</link>
      <guid>https://dev.to/ismailegilmez4/series-2-building-a-test-automation-team-2i3m</guid>
      <description>&lt;p&gt;We talked about topics to cover in our test automation strategy document in the first article of this blog series. In this second article of the series, we will cover some ideas about building a test automation team within a software organization.&lt;/p&gt;

&lt;p&gt;The other articles cover topics as below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Volume 1:  &lt;a href="https://blog.thundra.io/building-a-test-automation-strategy"&gt;&lt;strong&gt;Building a test automation strategy&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  Volume 2: Building a test automation team&lt;/li&gt;
&lt;li&gt;  Volume 3: Choosing the right testing framework&lt;/li&gt;
&lt;li&gt;  Volume 4: Knowing when to automate tests&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Need for a Test Automation Team
&lt;/h2&gt;

&lt;p&gt;Test automation is a piece of code that tests other pieces of code. For that reason, automating tests in software organizations require people with technical expertise and skills in coding.&lt;/p&gt;

&lt;p&gt;Writing good unit tests and providing good code coverage is possible with commitment and discipline, but a large investment of time and effort is required to create more complex integration tests or acceptance tests. If your developers are too busy to create quality tests, then it’s much better to build a team whose sole job is dealing with tests.&lt;/p&gt;

&lt;p&gt;Today, we can automate many of the simpler, common tests performed for applications. And it’s a good thing – the need for test automation has increased in software organizations that embrace DevOps and agile methodologies. Automated testing is a great way to deliver more resilient code more quickly, and leave technical resources for more complex issues to be manually tested.&lt;/p&gt;

&lt;p&gt;A test automation team works like its own company within the overall company. It owns the responsibility for designing, creating, and maintaining test automation in the entire organization, and consistently checks and validates product quality, and gives continuous feedback to development teams.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j7zSqAqL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62a1f640445fd466513e9922_%28Series%252520%2525232%29%252520Building%252520a%252520test%252520automation%252520team.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j7zSqAqL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62a1f640445fd466513e9922_%28Series%252520%2525232%29%252520Building%252520a%252520test%252520automation%252520team.gif" alt="gif" width="576" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Roles and Responsibilities in the Test Automation Team
&lt;/h2&gt;

&lt;p&gt;The development of robust testing infrastructure for applications is challenging due to the facet of constant change. The source code of applications is a living asset because it constantly changes, evolves, and grows as product management creates new feature requests as a response to users’ feedback.&lt;/p&gt;

&lt;p&gt;For a company to take software development seriously, they need to actively maintain the source code of applications. Responsible development teams will view the source code as a high-value repository that must be carefully managed and maintained.&lt;/p&gt;

&lt;p&gt;The code for any kind of tests, whether they’re automation tests or manual tests, should be taken just as seriously as the application code, and should likewise be maintained as a living asset in conjunction with the application code.&lt;/p&gt;

&lt;p&gt;Every development team works to write quality software, and development managers apply various methods to keep discipline high enough to deliver the utmost quality in their products. It is critical to cultivate and maintain the same mindset in the test automation team.&lt;/p&gt;

&lt;p&gt;The manager naturally should look for developers who can write automated tests as they create their automation team. But then the need for specialized professionals arises, making the automation team critical to application success. Below are some  &lt;a href="https://www.runforesight.com/blog/4-software-testing-roles"&gt;&lt;strong&gt;roles and responsibilities&lt;/strong&gt;&lt;/a&gt;  that cover the general requirements of this unique team.&lt;/p&gt;

&lt;h3&gt;
  
  
  Team leader
&lt;/h3&gt;

&lt;p&gt;The team leader must not only develop a test plan but manage the workload of their team members. They also coordinate with other teams to complete testing tasks. The team leader must have authority over assigning and controlling workflows for members of their team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer/Tester&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Test developers are responsible for developing and executing test cases. They are the experts in the functionality of the application and are responsible for analyzing and reporting the automated test results. They also know how to develop tests in any format, be it data records or scripts within a framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  Infrastructure engineer
&lt;/h3&gt;

&lt;p&gt;Specialists on infrastructure generally focus on maintaining the health of the test automation framework, test management, remote execution of tests, and the development of the automation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automation experts
&lt;/h3&gt;

&lt;p&gt;Experts must have administrative-level access in order to successfully execute automation tasks. These tasks include initial installation and configuration of the tool, as well as designing and configuring the test task for a given project. These experts are also imperative in upgrading the test automation and environment when necessary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Team Culture
&lt;/h2&gt;

&lt;p&gt;These guidelines are ideal for establishing a strong automation team. If these guidelines are followed, it is very likely for teams to achieve success in the long run.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  From the veterans to the junior members of a test automation team, every member should collaborate with each other and contribute to the test automation code. By doing so, everyone takes full ownership of the code being produced.&lt;/li&gt;
&lt;li&gt;  The test automation team manager should act as a mentor to upskill every team member in their specialized areas.&lt;/li&gt;
&lt;li&gt;  The test automation engineers should be able to work with production code when it is necessary.&lt;/li&gt;
&lt;li&gt;  Developers or testers should only modify production code if they feel confident enough to automate tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of note, having only one test automation engineer on the team is unsustainable. If possible, assign at least one person to be the designated maintainer of automation that has been built. This role can rotate on a daily basis.&lt;/p&gt;

&lt;p&gt;An engineer should be present in the team to manage the automation framework, while another professional should be keeping the entire team up to date by looking at the versions of the tools being utilized and the languages being used.&lt;/p&gt;

&lt;p&gt;Team managers should  &lt;a href="https://www.runforesight.com/"&gt;&lt;strong&gt;monitor automation health&lt;/strong&gt;&lt;/a&gt;  and its usage and should be able to point out areas where  &lt;a href="https://foresight.docs.thundra.io/features/test-runs"&gt;&lt;strong&gt;tests&lt;/strong&gt;&lt;/a&gt;  are running longer than expected, are flaky, or fail frequently. Tools like  &lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  help testing teams resolve issues pretty swiftly.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Team Evolves
&lt;/h2&gt;

&lt;p&gt;While considering new team members to join the team, take a close look at those who are motivated to learn and conform to the approach the team has already decided upon. Investigate and learn about their experience with other teams and where they contributed their best work on those teams.&lt;/p&gt;

&lt;p&gt;After the interview process has been completed and you’re considering who to hire, remember to be cautious of those who say they knew better than their previous leaders about what was best for their team’s success. Ask about practices they picked up from previous team members and leaders that they have applied in the past.&lt;/p&gt;

&lt;p&gt;It’s important to find people who are open-minded and not closed off to new ways of doing things. You should also look for employees who align their work and motivation with the team’s and organization’s direction, and who don’t take their own approach without direction.&lt;/p&gt;

&lt;p&gt;There’s always room to evolve over time and improve, regardless of what your team set-up looks like. You should never forget that automating tests help the organization save time, money, and energy, which can then be funneled into application development.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Save the date! 🕊️&lt;br&gt;
On the 28th of September, we are launching Foresight on Product Hunt 🎉🍻&lt;br&gt;
&lt;strong&gt;Take your seat before we launch on&lt;/strong&gt; &lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;strong&gt;Product Hunt&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;💜&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" alt="" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>testing</category>
      <category>cicd</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>4 Software Testing Roles</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Mon, 12 Sep 2022 13:54:39 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/4-software-testing-roles-35e7</link>
      <guid>https://dev.to/ismailegilmez4/4-software-testing-roles-35e7</guid>
      <description>&lt;p&gt;Software testing is the process of verifying a program or application to ensure that it performs as expected. It is an important part of the software development life cycle, as it can save teams from costly fixes. By understanding when and how to effectively run tests, a team will be able to  &lt;a href="https://www.runsidekick.com/blog/various-types-of-software-bugs-vol1"&gt;&lt;strong&gt;avoid common pitfalls&lt;/strong&gt;&lt;/a&gt;  in the software development life cycle.&lt;/p&gt;

&lt;p&gt;Software testing teams play a significant role in determining the success of a software product after development is completed – otherwise known as the pre-production stage.&lt;/p&gt;

&lt;p&gt;That's why the players of the software testing team should be highly talented and capable professionals in their domains – to put the bar of success as high as possible.&lt;/p&gt;

&lt;p&gt;As experts in this field, they should be able to create test scripts that will identify problems with the product in question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Categorization of Roles in Software Testing
&lt;/h2&gt;

&lt;p&gt;Every organization has its own team structure, but there are a few positions that need to be filled either by role or responsibility. These positions are critical to the success of testing teams because they cover different aspects of the testing process. These are:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. QA Engineer
&lt;/h3&gt;

&lt;p&gt;This position generally covers more than testing processes. A software quality assurance engineer constantly monitors each and every phase of the software development process and makes sure that the developed software meets quality standards. Additionally, they make sure that the software products work seamlessly without errors before they are pushed into production.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Test Manager
&lt;/h3&gt;

&lt;p&gt;A test manager acts as a project manager. This is a management position within the QA or test team, which is very common for custom software outsourcing organizations.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Test Engineer
&lt;/h3&gt;

&lt;p&gt;This is generally used as an umbrella term to cover many capabilities. It can refer to many engineers specialized in various testing approaches, such as manual testing, exploratory testing, performance testing, etc. It is also widely used to infer a testing position that minimally relies on automation.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Test Analyst
&lt;/h3&gt;

&lt;p&gt;This is a position that, rather than being more technical, focuses on business problems. Test analysts ensure the functional readiness of the application is acceptable before it is pushed into production. They generally design, develop, run, and troubleshoot tests to catch any defects or errors in the code in pre-production environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Test Automation Engineer
&lt;/h3&gt;

&lt;p&gt;This is a widely spread position among enterprises representing an engineer who codes (most likely a developer), but whose sole focus is on automating test processes. These people use testing frameworks such as Selenium, Cucumber, or others to effectively design and write new test cases. Another great advantage of test automation engineers is that they are well versed in GUI design and software testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Functions, Skills, and Responsibilities of Roles in Software Testing
&lt;/h2&gt;

&lt;p&gt;The software tester’s role in a project is utilized differently in different organizations depending on the size of the testing team, structure of the team, and specific requirements of the organization.&lt;/p&gt;

&lt;p&gt;Software testing job titles or positions are typically called “QA” or “test engineer”, but the technology they use, the business domain they are in, the expertise they have, or even the type of testing they make will differ.&lt;/p&gt;

&lt;p&gt;In the table below, you can review a summary of the core functions, responsibilities, required overall skills, and knowledge of required tools of some common software testing roles.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RJGBlN6c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b41d6ceb8a26198b2cdc16_Screen%2520Shot%25202022-06-23%2520at%252010.59.17.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RJGBlN6c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b41d6ceb8a26198b2cdc16_Screen%2520Shot%25202022-06-23%2520at%252010.59.17.png" alt="" width="880" height="1284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Overview of Software Testing Team&lt;/p&gt;

&lt;p&gt;The level of quality that can be achieved and how quickly you can reach your testing goals is entirely dependent on your testing team’s ability.&lt;/p&gt;

&lt;p&gt;It is important to have the appropriate balance of different types of testers to have a testing team that effectively complements each other. Another important topic when creating a software testing team is to gather together domain experts who have all relevant required knowledge to test an application thoroughly as a team.&lt;/p&gt;

&lt;p&gt;A strong software testing team needs to be structured in a certain way: The hierarchy needs to be clear and responsibilities need to be well-defined among team members. Well-organized teams are capable of handling all of the work effectively.&lt;/p&gt;

&lt;p&gt;If each team member knows what is expected from them, then they will be able to complete their work as needed within the deadline. Measuring the performance of the tester is key to success. You should be able to understand what kind of defects the tester is able to uncover and which ones they may miss.&lt;/p&gt;

&lt;p&gt;A “roles and responsibilities” document, which clearly defines everyone’s duties, should be created in participation with all the testing team members. This can be useful to aid quick communication with the person responsible for a task when an unexpected issue arises.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do We Still Need Testing Roles, or Should Developers Do Their Own Testing?
&lt;/h2&gt;

&lt;p&gt;Developer-based testing is being widely adopted by small-, medium-, and large-scale companies. Software developers are now required to write/run their own unit tests in many organizations. Moreover, some are asked to write automated and integrated code-based tests.&lt;/p&gt;

&lt;p&gt;However, building development tests takes up time that developers could be using to produce new code. As a result, many developers skip this process and create features without testing them.&lt;/p&gt;

&lt;p&gt;Developers can provide a significant amount of test coverage for their code, but this is often difficult to maintain if they don’t do it consistently across the entire codebase.&lt;/p&gt;

&lt;p&gt;Some software development teams release code into production with only a couple of unit tests or code reviews. There are some teams that don't even check to see if the code still compiles after making changes. Thus, to avoid consequences, if you are going to apply developer-based testing, you should have a granular, well-defined, and well-managed process for testing.&lt;/p&gt;

&lt;p&gt;There are software development teams that want to bypass testing their code for several reasons. One of the biggest reasons is the lack of visibility. When teams work within a small scope of the project, just like in most microservice applications, they are not able to understand the full execution flow of the entire application. This leads teams to be unwilling to test the produced code.&lt;/p&gt;

&lt;p&gt;Some developers strongly think that creating unit tests for their code is nothing but a waste of time: It's complicated, boring, and difficult to execute repeatedly, even if test automation is in place.&lt;/p&gt;

&lt;p&gt;You may ask why developers would test the software they create. There are developers who test their code thoroughly and take full responsibility to own the application. They write their own tests to understand if a code-fix breaks the production code, or even the build or the functionality of the application.&lt;/p&gt;

&lt;p&gt;It's not always easy to find these people who take testing as a matter of pride and cannot go to sleep without making their code flawless in pre-production.&lt;/p&gt;

&lt;p&gt;But here’s why testing is so important: Writing tests save time in the long run by reducing issues both in pre-production and production environments. Also, end-user/customer satisfaction increases because developers start to catch defects before they reach end-users.&lt;/p&gt;

&lt;p&gt;Many developers don't like testing because it can be tedious, repetitive, and complicated. They do not fully understand the nuances of how every aspect of the application works together.&lt;/p&gt;

&lt;p&gt;However, if you manage it well, in other words, if the software teams get round to testing as well as coding in their development life cycle, then the developers’ testing is very productive and indispensable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  helps developers, test engineers, QA engineers, QA managers, test managers, test analysts, test automation engineers, engineering managers, and all with its test monitoring and debugging capabilities.&lt;/p&gt;

&lt;p&gt;If you haven't yet,  &lt;a href="https://foresight.thundra.io/signup"&gt;&lt;strong&gt;get started with Foresight&lt;/strong&gt;&lt;/a&gt;  today!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Save the date! 🕊️&lt;br&gt;
On the 28th of September, we are launching Foresight on Product Hunt 🎉🍻&lt;br&gt;
&lt;strong&gt;Take your seat before we launch on&lt;/strong&gt; &lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;strong&gt;Product Hunt&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;💜&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" alt="" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>testing</category>
      <category>cloud</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Why a CI/CD Pipeline Makes Good Business Sense</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Mon, 12 Sep 2022 13:51:54 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/why-a-cicd-pipeline-makes-good-business-sense-3lm0</link>
      <guid>https://dev.to/ismailegilmez4/why-a-cicd-pipeline-makes-good-business-sense-3lm0</guid>
      <description>&lt;p&gt;If your business is thinking of switching over to an integration and continuous deployment/delivery (CI/CD) model of software production, the first thing you may wonder is whether this move is good for business. Migrating and training your team will take time and money, but sometimes it’s not clear what the payoff is and how and when you’re going to start seeing any ROI.&lt;/p&gt;

&lt;p&gt;It’s reasonable to be cautious and not leap to embrace whatever the latest buzzword happens to be. But CI/CD has been around for the better part of 20 years and has  &lt;a href="https://www.gartner.com/smarterwithgartner/5-steps-to-master-continuous-delivery/"&gt;&lt;strong&gt;proven its value as part of the DevOps culture&lt;/strong&gt;&lt;/a&gt;, which encourages a much faster release cycle and is more responsive overall to business needs.&lt;/p&gt;

&lt;p&gt;CI/CD has also managed to prove itself not only in terms of speed—which is not in itself a metric of success—but in terms of driving concrete business value, such as shortening time to market with new applications, features, and services, as well as improving metrics like customer satisfaction and loyalty.&lt;/p&gt;

&lt;p&gt;That’s why it’s important for business decision-makers to push past the hype to fully understand from the ground up what CI/CD actually is and what it has to offer an organization. That way, there will be maximum buy-in—not just within IT and operations, but throughout the entire organization.&lt;/p&gt;

&lt;p&gt;To help your organization get informed before deciding whether or not to invest in CI/CD, let’s take a look at some of the benefits and challenges CI/CD pipelines introduce.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI/CD Pipelines: The Basics
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.runforesight.com/blog/get-healthy-pre-production-tips-to-help-developers-thrive"&gt;&lt;strong&gt;Understanding the CI/CD pipeline&lt;/strong&gt;&lt;/a&gt; requires a shared grasp of some foundational concepts and terminology:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Continuous integration.&lt;/strong&gt; As  code is changed, it is automatically and seamlessly merged with the central repository, or “mainline.” This is done frequently to eliminate the possibility that some or all of the development team is working with out-of-date copies of the code, which could cause an application to break.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Continuous delivery.&lt;/strong&gt;  When checked-in mainline code is ready for deployment to end-users, it is then alpha and beta tested in “staging,” or non-production environments, and then manually released to production.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Continuous deployment.&lt;/strong&gt;  While with continuous delivery, customers do not receive the update until it is manually released, continuous deployment extends the use of automation in the testing environment and automatically releases the newest changes to production as soon as they have passed all required tests.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;DevOps.&lt;/strong&gt; This term is ubiquitous in the CI/CD world and is often treated as if the two were identical. Dev/Ops refers to the underlying mindset more than to a particular methodology. It refers to the cultural change required to foster a faster release cycle, create collaborative interdisciplinary teams (comprising developers, operations, quality assurance, and management), and introduce automation into the process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before CI/CD, software development generally took place according to the “waterfall” model, where each stage took place completely separately. Code for new features, services, libraries, or applications would be developed and perhaps unit-tested separately. Then, they would be integrated, potentially creating a large number of failures all at once. Then, pre-release testing would take place simultaneously near the end of the software development life cycle (SDLC).&lt;/p&gt;

&lt;p&gt;It’s easy to understand how, with this model, moving an application from development to production was a major undertaking that companies were not willing to do very often. This is especially true because, with each release, new bugs would be discovered—since regardless of which model you’re using for development,  &lt;a href="https://smallbusiness.chron.com/not-feasible-companies-produce-errorfree-software-59309.html"&gt;&lt;strong&gt;it’s impossible to release error-free software&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With the waterfall model, discovering a bug once the software was in production often required taking apart the software to track and troubleshoot, potentially requiring the company to begin the cycle all over again.&lt;/p&gt;

&lt;p&gt;By focusing on smaller, incremental changes to code, and a faster release cycle, CI/CD provides greater agility. With this approach, if bugs are discovered in post-production, a mechanism is already in place to perform rapid fixes or implement new features, leading to greater customer satisfaction. Over the last decade, study after study,  &lt;a href="http://www.scielo.org.za/pdf/sacj/v32n1/03.pdf"&gt;&lt;strong&gt;such as this recent research article from the University of Johannesburg&lt;/strong&gt;&lt;/a&gt;, has shown vastly more positive outcomes for this style of software development over waterfall-style development.&lt;/p&gt;

&lt;p&gt;Today, organizations using a CI/CD approach generally release daily or every few days—but new releases can occur multiple times a day if needed.&lt;/p&gt;

&lt;p&gt;Together, CI and CD are referred to as a “pipeline” because the goal is to keep functional, fully integrated code flowing through the pipeline and ultimately into the hands of end-users.&lt;/p&gt;

&lt;p&gt;Many large vendors are now offering tools for CI/CD software development: Microsoft, AWS, IBM, Red Hat, and others. But since organizations’ needs vary widely, most end up creating a custom “tool stack” rather than embracing an end-to-end solution from a single vendor.  &lt;a href="http://www.runforesight.com/blog/the-ci-cd-war-of-2022-a-look-at-the-most-popular-ci-cd-tools"&gt;&lt;strong&gt;Tools&lt;/strong&gt;&lt;/a&gt;  required include source code management (such as GitHub), a CI server (such as Jenkins), provisioning (such as Ansible), and deployment (such as Terraform).&lt;/p&gt;

&lt;p&gt;One final term you may encounter that is also important to understand:&lt;/p&gt;

&lt;p&gt;While DevOps and CI/CD are not synonymous, setting up a CI/CD pipeline is by far the most common way businesses can achieve a DevOps transformation in modern software development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Business Benefits of CI/CD Pipelines
&lt;/h2&gt;

&lt;p&gt;When it comes to business benefits, we need to cut through the high-tech buzzwords and focus on concrete deliverables that take the company strategically in the direction it needs to go. Here are just a few of the benefits companies have found from implementing CI/CD:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Better quality software&lt;/strong&gt;. With CI/CD, your developers are handling smaller sections of code, meaning that if problems do emerge, it will be simpler and quicker to find a resolution. It also lowers the chance that errors make it into the production environment. Additionally, by incorporating automated testing, CI/CD can resolve many bugs before they make it into end users’ hands, boosting user satisfaction.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Faster time to market&lt;/strong&gt;. Whether your product is new or an update, CI/CD gives you a literal pipeline straight to your market while ensuring that thorough testing still takes place. And since requirements can change often during development, these changes can be incorporated easily, leading to a better-quality product once it’s released. This means you’re going to start seeing value sooner as well as maintain a competitive edge.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Fail fast.&lt;/strong&gt;  It may sound undesirable to hope something will fail quickly, but this is actually one of the most important principles of CI/CD. When new functions and features go wrong, you’ll get immediate feedback and can fix the product quickly. Because of this, CI/CD is the perfect way to conduct various types of tests: A-B testing, canary launches, blue-green testing, and dark testing are all ways to deploy and test new product features prior to a full release. And if there’s ever a problem with a release, CI/CD guarantees that you can roll things back without any serious customer impact.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Smashing silos.&lt;/strong&gt; While the term “breaking down silos” is everywhere in today’s business world, CI/CD is probably its biggest use case. By creating collaboration among developers, product managers, testers, and operations admins, you’ll build a culture of agility and innovation throughout your entire organization along with boosting shared responsibility, keeping everybody on your team aware of the business mission and strategy.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Happy workers&lt;/strong&gt;. Coders love to code. Everything else is secondary, and many functions development, IT, and operations teams perform are tedious and can actually lead to burnout. CI/CD introduces numerous points where automation can take over, giving them more time for creativity and enhanced productivity, which leads to cost savings.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Data stream&lt;/strong&gt;. With its modern, business-oriented tooling, CI/CD offers the flexibility to generate, track, and report on valuable metrics across the entire SDLC. Some tools even provide ongoing monitoring and observability data from the production environment, which help your business leaders make important decisions when it comes to infrastructure, product roadmaps, team performance, and more.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ensuring observability&lt;/strong&gt;. This is not only a function of CI/CD. Essentially, modern software development environments are distributed, meaning they may be spread across physical locations or in the cloud. With code changing often, it is possible that something that previously functioned properly may stop working, and then it can be tough to track down the issue that caused the application to break. This challenge can be solved by building observability into the CI/CD pipeline with tools that can correlate application performance with code merges to help you speed the time to fix problems.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Too agile?&lt;/strong&gt; Because a well-oiled CI/CD pipeline provides such superior agility, it may be tempting for execs and managers to demand one-off changes, potentially just on a whim, introducing features or “fixes” that don’t fit the organization’s overall strategy. Constantly introducing changes without keeping an eye on the strategic roadmap can make it tough to achieve the cost benefits promised by CI/CD.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Business Challenges of a CI/CD Pipeline
&lt;/h2&gt;

&lt;p&gt;Let’s be honest, any type of change within an organization is difficult. While the development team will likely be satisfied overall with the benefits of CI/CD, here are a few challenges you could possibly encounter.&lt;/p&gt;

&lt;p&gt;Beyond  technological issues, CI/CD may raise cultural issues within your organization. For instance, developers and admins may fear that they are likely to put themselves out of a job thanks to all of its automation benefits.&lt;/p&gt;

&lt;p&gt;It’s best to communicate to your employees that the move to CI/CD is part of a commitment to the DevOps mindset as a whole. Explore issues like end-user benefits and help these team members understand how essential their work is to your overall business goals.&lt;/p&gt;

&lt;p&gt;You also need to provide training wherever necessary to help employees upgrade their skills and be able to use any new tools they are expected to work with. It is generally less expensive to train your existing workforce than find new hires with expensive cutting-edge skills. For example, project managers may need support in understanding today’s agile processes and tools in order to keep up with the velocity of CI/CD. This is also part of the up-front investment of CI/CD.&lt;/p&gt;

&lt;h2&gt;
  
  
  Metrics for Tracking CI/CD ROI
&lt;/h2&gt;

&lt;p&gt;It may be hard to believe, but each year, around the world, failed IT projects wind up  &lt;a href="https://www.theee.ai/2021/01/06/6838-poor-software-quality-cost-the-usd-2-08-tn-in-2020/"&gt;&lt;strong&gt;costing $260 billion (€210.84 billion)&lt;/strong&gt;&lt;/a&gt;  yearly in the U.S. alone. How do IT projects fail? Problems encountered could include non-completion, inability to release, failure to effectively address business needs, cost overruns, and missed timelines.&lt;/p&gt;

&lt;p&gt;Therefore, the first metric of value in determining the ROI of CI/CD pipelines is ensuring that they have cut the risk and cost of IT failure with higher-quality code and highly functional products and systems. By automating and optimizing provisioning and testing workflows, your company should begin almost immediately to be able to reduce errors and lower costs.&lt;/p&gt;

&lt;p&gt;Key performance indicators (KPIs) for your CI/CD pipeline’s effectiveness can be measured through tracking factors like deployment frequency. However, simply releasing fast isn’t an accurate indicator of effectiveness, so this metric should be combined with others such as deployment failure rate, change volume, the ability to meet availability and performance SLAs, mean time to recovery (MTTR), defect volume, and escape rate.&lt;/p&gt;

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

&lt;p&gt;Earlier, we mentioned that CI/CD is not synonymous with DevOps. Yet the benefits of both are clear. While the older “waterfall” method encouraged a slow and cautious mindset—since a software release was by necessity a major and often traumatic event—today’s agile development models foster a mindset of speed and quality.&lt;/p&gt;

&lt;p&gt;That mindset in itself can help your business tremendously. Developers who observe how simple it is to iterate the application will be quick to suggest improvements or flag problematic behavior before it lands in front of a customer.&lt;/p&gt;

&lt;p&gt;As so many companies have discovered, a strategic move to CI/CD can offer you more innovation overall, along with clearer communication and better productivity throughout the entire organization. Which ultimately gives you a competitive edge.&lt;/p&gt;

&lt;p&gt;Building observability from the ground up with  &lt;a href="https://www.runforesight.com/"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  can help overcome many of the main obstacles on the way to a  &lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;strong&gt;productive CI/CD pipeline environment&lt;/strong&gt;&lt;/a&gt;, including the challenges of observability when debugging highly distributed microservices and cloud-native applications. Find out how easy it is to get started with  &lt;a href="https://foresight.thundra.io/signup"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  today.&lt;/p&gt;

&lt;p&gt;We will be glad to answer your questions through our  &lt;a href="https://discord.com/invite/bCtCmzP2ge"&gt;&lt;strong&gt;Discord community&lt;/strong&gt;&lt;/a&gt;,  &lt;a href="//mailto:support@runforesight.com"&gt;&lt;strong&gt;support@runforesight.com&lt;/strong&gt;&lt;/a&gt;, or our  &lt;a href="https://www.runforesight.com/contact-us"&gt;&lt;strong&gt;contact us&lt;/strong&gt;&lt;/a&gt;  page.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Save the date! 🕊️&lt;br&gt;
On the 28th of September, we are launching Foresight on Product Hunt 🎉🍻&lt;br&gt;
&lt;strong&gt;Take your seat before we launch on&lt;/strong&gt; &lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;strong&gt;Product Hunt&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;💜&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" alt="" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cicd</category>
      <category>testing</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Introduction to Software Testing</title>
      <dc:creator>Ismail Egilmez</dc:creator>
      <pubDate>Mon, 12 Sep 2022 13:50:00 +0000</pubDate>
      <link>https://dev.to/ismailegilmez4/introduction-to-software-testing-47pp</link>
      <guid>https://dev.to/ismailegilmez4/introduction-to-software-testing-47pp</guid>
      <description>&lt;p&gt;Cloud-native applications provide benefits such as rapid deployment, scalability, and reduced costs. The downside is that testing, debugging, and troubleshooting on these types of apps is more difficult than on traditional applications.&lt;/p&gt;

&lt;p&gt;In recent years, software testing has matured from manual testing to automated testing. There are multiple testing tools, strategies, and patterns in the market, which are very useful and important in making cloud-native application development fault-free. In this article, we explain the basics of testing cloud-native applications.&lt;/p&gt;

&lt;p&gt;Let’s quickly bring up what is covered in this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Why do we test applications?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operativeness&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resilience&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What Are the Testing Concepts?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TDD (Test Driven Development)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;BDD (Behavior Driven Development)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What Are the Testing Patterns?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A/B Testing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test Doubles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What Are the Testing Types?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unit Testing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integration Testing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Load Testing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regression Testing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Testing Never Ends&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why do we test applications?
&lt;/h2&gt;

&lt;p&gt;From a traditional software development standpoint, testing occurs after development is completed and handed over to test engineers by software developers. Test engineers then perform their tests and, if everything works well, the code is deployed to production.&lt;/p&gt;

&lt;p&gt;Errors can emerge at any phase of the development life cycle in a software development project (and while there are various types of software bugs, only a few of them are known to be irreparable). It is, therefore, crucial to perform software testing to prevent the occurrence of software bugs in critical environments like production.&lt;/p&gt;

&lt;p&gt;Quality assurance plays a big role in minimizing the chances that the production code has functionality or design errors – and software quality is assured by testing in the cloud-native era, which has become an integral part of the development cycle. Although testing does have a cost, it is incredibly useful because the cost of production failures would be much higher and impactful.&lt;/p&gt;

&lt;p&gt;Any development team that owns an application would need to ensure service quality in terms of the following aspects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Performance&lt;/li&gt;
&lt;li&gt;  Operativeness&lt;/li&gt;
&lt;li&gt;  Resilience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are the bare minimum requirements to ensure software quality. Depending on the requirements of your business logic or your market-specific requirements, you might want to consider testing for security, availability, usability, UX/UI, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance
&lt;/h3&gt;

&lt;p&gt;The performance of your application as it’s perceived by the end-user is affected by complex combinations of environmental effects, access patterns, and most importantly, the data being processed. That’s why it’s so unfortunate that many software teams do not actually test for performance as much as they could, since it is a vital quality aspect.&lt;/p&gt;

&lt;p&gt;There are a lot of test concepts, patterns, and types that can improve the performance of our cloud-native applications, but it’s crucial to construct and follow a testing strategy that aligns with the development life cycle. As an example,  &lt;a href="https://en.wikipedia.org/wiki/Benchmark_(computing)"&gt;&lt;strong&gt;benchmark testing&lt;/strong&gt;&lt;/a&gt;  is one of the most preferred and economical ways to collect performance data about our application code.&lt;/p&gt;

&lt;p&gt;If you don’t test your application in production, then you can’t be sure that performance regressions won’t occur. Even if you heavily invest in testing in pre-production environments, you should still expand testing practices to the entire software life cycle to ensure quality with less cost and effort.&lt;/p&gt;

&lt;p&gt;For instance, debugging and performance management tooling is an excellent testing strategy to utilize in production for detecting and understanding issues in your distributed cloud applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Operativeness
&lt;/h3&gt;

&lt;p&gt;Running unit tests and integration tests can help you ensure that your service performs the way you want it to without defects. In these tests, we generally define a set of expected responses from our service to make sure it operates well and correctly. However, unit and integration tests aren’t the only tests available – many others, such as mutation tests, fuzz tests, etc. can be utilized to test the accuracy of application behavior at a wide range.&lt;/p&gt;

&lt;p&gt;As mentioned before, though, you should extend your testing strategy to production to make sure the operativeness and accuracy of your service is as perfect as it can be. You should also be agile in receiving and incorporating error feedback with functional debugging and troubleshooting capabilities. But if the application is on the cloud, there’s no guarantee that it will act flawlessly in production. The end-users, therefore, will be your best testers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resilience
&lt;/h3&gt;

&lt;p&gt;Before the cloud-native era, testing for robustness and resilience was not a priority because mostly monolithic applications did not have as many dependencies and the types of errors that could be encountered were well-known. Microservice architectures in the cloud era, however, brought the concept of dependency to applications and made them vulnerable and fragile. Due to these circumstances, if your application is not tested thoroughly for resilience, then your end-users are likely to be impacted.&lt;/p&gt;

&lt;p&gt;With a cloud-native microservice application, you need to carefully manage the interactions between your service and dependencies. Both errors and latencies might occur and thus impact the end-user’s experience.&lt;/p&gt;

&lt;p&gt;Having testing procedures and standards in place is imperative to make sure service is resilient even when dependencies fail. For example, automated tests that simulate the known failures in pre-production settings should be applied frequently. Additionally, for errors and failures that cannot be simulated in pre-production environments, enrolling chaos engineering strategies allows you to test for these issues in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are the Testing Concepts?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  TDD: Test-Driven Development
&lt;/h3&gt;

&lt;p&gt;The idea of test-driven development originated in the ’70s in opposition to Glenford Myers’ publication “&lt;a href="https://www.amazon.fr/dp/0471627658"&gt;&lt;strong&gt;Software Reliability&lt;/strong&gt;&lt;/a&gt;,” which asserted the “axiom” that “a developer should never test their own code.” Test-driven development (TDD) refers to a style of programming that involves a three-action cycle: coding, testing, and design. Testing in TDD consists mainly of writing unit tests and designs which contain the activities needed to refactor code.&lt;/p&gt;

&lt;p&gt;A TDD project normally begins by defining and understanding the requirements necessary to reach the solution to a problem. Next, we write test cases to verify that the requirements are valid. And finally, we write the code that has passed the tests. Until business functionality is ensured and satisfied, this process iterates to complete the test cases and the required code.&lt;/p&gt;

&lt;p&gt;TDD is also called “Test-First Development,” as it forces the developer to develop and run automated tests before the application’s actual code can be developed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SpRqqNwl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b4676b891b16fbc98516b7_Introduction%252520to%252520Software%252520Testing_MAA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SpRqqNwl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b4676b891b16fbc98516b7_Introduction%252520to%252520Software%252520Testing_MAA.jpeg" alt="TDD" width="880" height="1100"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The image above shows the difference between the waterfall and TDD model processes.&lt;/p&gt;

&lt;p&gt;The benefits of TDD are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Test coverage increases. Almost every line of code is run by test methods.&lt;/li&gt;
&lt;li&gt;  Errors are localized with unit tests, increasing the trustworthiness of the code.&lt;/li&gt;
&lt;li&gt;  Tests serve as documentation describing the way the code works. Developers can understand how the code works in a short period of time by analyzing these tests.&lt;/li&gt;
&lt;li&gt;  The need to debug code is minimized.&lt;/li&gt;
&lt;li&gt;  You have the design-first point of view in software development.&lt;/li&gt;
&lt;li&gt;  Over-engineering is more easily avoided.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  BDD - Behavior-Driven Development
&lt;/h3&gt;

&lt;p&gt;Behavior-driven development (BDD) is a branch of test-driven development that inherits agile development principles and user stories, which presents development as a set of scenarios in which applications behave in a certain way.&lt;/p&gt;

&lt;p&gt;It reduces the chance of mistakes and brings more clarification to development because it allows the scenarios, actions, and conditions to be transposed into a simple, common terminology between the software development and business teams.&lt;/p&gt;

&lt;p&gt;In other words, BDD enhances communication and collaboration between product management and software development teams as it helps to describe requirements in the form of scenarios, making it easier for all parties involved to stay on the same page.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are the Testing Patterns?
&lt;/h2&gt;

&lt;p&gt;There are a few testing patterns for cloud applications that enable us to meet quality standards in an easier way.&lt;/p&gt;

&lt;h3&gt;
  
  
  A/B Testing
&lt;/h3&gt;

&lt;p&gt;A/B testing, also known as split testing, was originally intended to discover user responses to two different web pages that have the same functionality. Essentially, a small group of users is selected to see version A of the web page and another small group of users is selected to see version B of the web page. If the users respond in favor of a certain version, then that version of the web page is selected to move forward with.&lt;/p&gt;

&lt;p&gt;This approach can be applied to the introduction of new features in an application in a phased way. A new service or feature is introduced to a selected set of users and their responses are measured. The results are compared to the responses of the other selected groups who used the original version of the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test Doubles
&lt;/h3&gt;

&lt;p&gt;Most of the time, the performance of your application under tests depends on its interactions with other components of the application being produced by other developers. A test double replaces the actual component and mimics its behaviors. The test double, unlike real components that are dependencies or external third parties, is typically a lightweight version of the components under the control of the development team.&lt;/p&gt;

&lt;p&gt;There are many types of test doubles, such as Dummy, Fakes, Test Stubs, and Mocks.&lt;/p&gt;

&lt;p&gt;There are some disadvantages to using test doubles, however:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The test doubles may not be available to give data to the required tests for different cases.&lt;/li&gt;
&lt;li&gt;  The functionality of the test doubles may not be suitable for testing at the time of development.&lt;/li&gt;
&lt;li&gt;  Trying to use the actual dependencies during tests may slow down the testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Test Stubs
&lt;/h4&gt;

&lt;p&gt;A test stub holds predefined data and answers the calls it receives during tests with that data. When we don’t want to use real dependencies in our tests (or when we simply can’t), we tend to use test stubs to eliminate the side effects of the real data.&lt;/p&gt;

&lt;p&gt;Test stubs are useful when a dependency’s response alters the system’s behavior during tests. For example, if we have a service that takes input from an external service, that input determines our service’s response. A test stub allows us to mimic various scenarios that cause a change in the behavior of the product service.&lt;/p&gt;

&lt;h4&gt;
  
  
  Mock Objects
&lt;/h4&gt;

&lt;p&gt;Mock objects, on the other hand, record the system’s behavior and then present the recording for us to verify. Mocks register received calls, and we can then check to see if all the expected actions were performed.&lt;/p&gt;

&lt;p&gt;When there is no easy way to verify that our application code was executed, or when we simply cannot invoke the production code, we use mocks. The downside is that there is no return value and it’s not easy to check the system’s state.&lt;/p&gt;

&lt;p&gt;As an example, let’s take the SMS sending service in an incident management tool like OpsGenie. You don’t want to send SMSs each time you test your code, and it’s not always possible or easy to verify that the correct SMS is sent during tests. You can only verify the output of the functionality that’s done in tests. To overcome this, you can use mocks to take the place of the SMS sending service in tests.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fakes
&lt;/h4&gt;

&lt;p&gt;Fakes are objects with limited capabilities. Essentially, they work like the real object but they have a simplified version of the production code. We generally use fakes to simplify the implementation of our tests without affecting the system’s behavior.&lt;/p&gt;

&lt;p&gt;A perfect example of a fake is an in-memory database. It’s a lightweight database that isn’t used in production, but is still perfectly adequate to use as a database in a testing environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are the Testing Types?
&lt;/h2&gt;

&lt;p&gt;Even before cloud computing became popular, software testing types were known and applied in software development. CI/CD pipelines used in DevOps or Agile methodologies made it possible to automate these testing types so that they could run each time a code build was taken or a check was required.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unit Testing
&lt;/h3&gt;

&lt;p&gt;Unit tests are used for individual units and functions of an application’s code. In cloud-native applications, the essential purpose of unit tests is to test the smallest possible part of the application. It is possible with this testing type to isolate the dependencies of tested services using mock objects or test stubs in order to focus solely on testing applications.&lt;/p&gt;

&lt;p&gt;Unit testing aims to test each class or code component to ensure they perform as expected. If you are a Java user, JUnit is one of the popular Java frameworks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integration Testing
&lt;/h3&gt;

&lt;p&gt;The purpose of integration testing is to check whether the components of your application, such as different services, are being performed correctly. Microservice cloud applications consist of various software modules, coded by different developers. The purpose of this level of testing is to expose defects in the interactions between these software modules when they are integrated. Because of the focus on testing the efficacy of data communication, integration testing is sometimes called “string testing” or “thread testing.”&lt;/p&gt;

&lt;p&gt;Although each piece of code is unit tested, errors can still exist for multiple reasons. These include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The programming logic of different developers who are all contributing to the project may be different. This nuance in their understanding may require verification that the software modules work well together.&lt;/li&gt;
&lt;li&gt;  Exception handling is not always done correctly.&lt;/li&gt;
&lt;li&gt;  Database connections of the software modules may be faulty.&lt;/li&gt;
&lt;li&gt;  The project’s requirements may change by the time development continues.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Load Testing
&lt;/h3&gt;

&lt;p&gt;Load testing is the process of simulating the demand on your system within a specific period of time, and then measuring the performance effect of the load on the system (such as error rates and response time). Load tests are sometimes called performance testing, non-functional testing, or stress testing.&lt;/p&gt;

&lt;p&gt;Load testing is a crucial part of cloud-native application development and DevOps as it helps application teams build and deploy their applications with confidence in pre-production and production environments. It’s critical for the business component of your application to be able to scale to meet demand. That’s why load testing your applications is so important: If you don’t use load testing on your applications, your end-users can be impacted at times when demand bumps up.&lt;/p&gt;

&lt;h3&gt;
  
  
  Regression Testing
&lt;/h3&gt;

&lt;p&gt;The existing functionality of applications should not break when a new functionality is introduced. Regression testing ensures that a code change has not negatively affected the existing features of an application. Simply put, regression testing is a full or partial selection of already-executed test cases (whether functional or nonfunctional) that are then re-executed to ensure existing functionalities are working fine. If a functionality doesn’t work as it should, this is called a regression.&lt;/p&gt;

&lt;p&gt;Whenever we do a bug fix, change a configuration, or even refactor or enhance code , we may need to run the regression tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing Never Ends
&lt;/h2&gt;

&lt;p&gt;The DevOps software development cycle has evolved to include tests at all phases of development. Testing never ends, and never should, in order to keep end-users happy.&lt;/p&gt;

&lt;p&gt;Back in the monolith age and at the beginning of the cloud age, developers used to complete development and then hand the application over to quality assurance engineers before deployment. But now, since applications are almost atomized in the cloud and applications are more complex, distributed, and asynchronous, the old routine for testing has irrevocably changed. Deployment is much more frequent than before and automated thanks to CI/CD pipelines.&lt;/p&gt;

&lt;p&gt;On the other hand, monitoring and observability are widely used in production environments, but pre-production environments are left out in the cold by observability solutions. To ease the load on developers, observability should be applicable to software tests for cloud applications by default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VZL1oR9Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b4676cdf02850698b6a373_Image%252520from%252520iOS-Jul-06-2021-07-40-01-67-AM.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VZL1oR9Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/62b4676cdf02850698b6a373_Image%252520from%252520iOS-Jul-06-2021-07-40-01-67-AM.jpeg" alt="Image from iOS-Jul-06-2021-07-40-01-67-AM" width="706" height="497"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You run several unit tests every time before you push your code, and integration tests are run by CI automatically. You continuously test for errors to make sure your service is served to end-users fault-free.&lt;/p&gt;

&lt;p&gt;Testing helps us build more reliable, resilient, well-performing, and maintainable applications – if we have the ability to troubleshoot our tests quickly via observability. Instrumentation that enables us to troubleshoot our tests in CI environments is a valuable asset to have.&lt;/p&gt;

&lt;p&gt;As discussed, tens of thousands of tests run automatically in a CI pipeline before a change in an application goes to production but this process is not easy as to speak.  &lt;a href="https://www.runforesight.com/"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  is a product that addresses visibility problems in CI environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  is a comprehensive solution that provides insights and analytics for both CICD pipelines and tests furthermore automatically assessing the level of risk of software changes and suggesting optimization and prioritization tips for automated tests in CI pipelines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://foresight.thundra.io/signup"&gt;&lt;strong&gt;&lt;em&gt;Explore&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;how Foresight works with your projects now.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Save the date! 🕊️&lt;br&gt;
On the 28th of September, we are launching Foresight on Product Hunt 🎉🍻&lt;br&gt;
&lt;strong&gt;Take your seat before we launch on&lt;/strong&gt; &lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;strong&gt;Product Hunt&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;💜&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.producthunt.com/upcoming/foresight-ci-test-monitoring-for-github-actions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZZ7KUjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://assets.website-files.com/6294d502b5093e3965b91f4d/631b1da59b02dabd4c193ad6_unnamed.png" alt="" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>testing</category>
      <category>devops</category>
      <category>cicd</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
