<?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: Burak Kantarcı</title>
    <description>The latest articles on DEV Community by Burak Kantarcı (@kantarci).</description>
    <link>https://dev.to/kantarci</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%2F371756%2F4c63f16f-981e-4ec8-9793-99d1c42b390b.jpg</url>
      <title>DEV Community: Burak Kantarcı</title>
      <link>https://dev.to/kantarci</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kantarci"/>
    <language>en</language>
    <item>
      <title>How engineering leaders can have more visibility on their GitHub Actions</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Wed, 23 Nov 2022 07:03:17 +0000</pubDate>
      <link>https://dev.to/kantarci/how-engineering-leaders-can-have-more-visibility-on-their-github-actions-34pb</link>
      <guid>https://dev.to/kantarci/how-engineering-leaders-can-have-more-visibility-on-their-github-actions-34pb</guid>
      <description>&lt;p&gt;Engineering leaders are responsible for development processes and their team’s experience. Today’s leaders in engineering must take decisions based on data. What measurements ought to be monitored as the key performance indicators for the team on their CI/CD process? Which specific facts should technical leaders focus on?&lt;/p&gt;

&lt;p&gt;‍&lt;strong&gt;&lt;em&gt;Serkan Ozal, CTO, and Co-Founder at Thundra&lt;/em&gt;&lt;/strong&gt;  says&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Without a proper CI pipeline, it is impossible to send your code bug-free to production.&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;If the failed tests running on your CI are not investigated properly, it is expected that the code will break something in production.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Common things when developers see a failed test or workflow are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Re-running the whole workflow from the start&lt;/li&gt;
&lt;li&gt;  Try to reproduce the bug on local&lt;/li&gt;
&lt;li&gt;  Dig into the log piles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although the traditional ways are still helping the developers, it loses so much time than expected.&lt;/p&gt;

&lt;p&gt;‍&lt;strong&gt;&lt;em&gt;Lemi Orhan, CTO, and Co-Founder at Craftgate&lt;/em&gt;&lt;/strong&gt;  mention how crucial is to be aware of the CI performance at a high development pace.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;We have more than 160 workflow runs each day.&lt;/em&gt; &lt;strong&gt;&lt;em&gt;It is very hard to identify when and why our workflows have failed.&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;It is likely that one of our workflows start to run 5 times slower than usual. We needed to be alerted in some way.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Metrics about your CI and test performance attempt to guide you to a defect-free and quick software delivery when you take a broad view of the process of shipping software from development to production.&lt;/p&gt;

&lt;p&gt;‍&lt;strong&gt;&lt;em&gt;Stian Thorgensen, Keycloak Project Lead&lt;/em&gt;&lt;/strong&gt;  shares some insight about why they chose GitHub Actions over many alternatives&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;As an open-source project, we were using Travis CI, but&lt;/em&gt; &lt;strong&gt;&lt;em&gt;we switched to GitHub Actions very quickly.&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;It allows you to have twice as many parallel runs, for free. That’s why we have switched to it.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;However, GitHub Actions fall short of answering crucial questions like;&lt;/p&gt;

&lt;p&gt;🆘 Which tests are blocking the PR?&lt;br&gt;&lt;br&gt;
🤯 Which changed lines haven’t been tested?&lt;br&gt;&lt;br&gt;
💰 What is the most costly workflow?&lt;br&gt;&lt;br&gt;
🔻 Is my workflow success rate decreasing?&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution: Foresight
&lt;/h2&gt;

&lt;p&gt;Foresight brings visibility into CI workflows and test runs, enabling developers to debug CI, build, and test failures and latencies quickly. Furthermore, Foresight’s change impact analysis helps you analyze the impact of the code changes to detect defects early in the release cycle.&lt;/p&gt;

&lt;p&gt;With the help of the Highlights dashboard, engineering managers, and CTOs are eligible to answer the below questions;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Which workflows fail frequently and need to be optimized?&lt;/li&gt;
&lt;li&gt;  What is the duration/success/cost trend in my workflows?&lt;/li&gt;
&lt;li&gt;  Where do we need to start taking action about health and optimization?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stian tells his experience about Foresight until now:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;We’ve been avoiding non-releasable junks due to the broken, unstable, and flaky tests.&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Foresight gives you the ability to look at more than one workflow at a time. You can easily see the tests and the results without losing your way in the log piles.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You may check the new code’s level of testing and how it affects your test results using Foresight’s PR view. The changes that prolong the merging process are easy to spot using Foresight.  &lt;strong&gt;As a result, Foresight assists you in maintaining your contributions to your open-source project in a secure and effective way.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lemi adds to his initial experiences:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;We have many repositories including several mono repositories. Foresight helped us to monitor all the workflows, runs, and test results from one single place, to improve the pipeline by the alerts, and to save a lot of time. I highly recommend it to the community.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you would like to watch the Foresight demo and hear more from Serkan, Lemi and Stian, don’t forget to check out the  &lt;a href="https://cz90304.na1.hubspotlinks.com/Ctc/RG+113/cz90304/VWlL391P5122W40jqVs3n12vSW4lQ0X34SwsJFN52hRj53q90_V1-WJV7CgWzYN2hhckVQGHF_W4H1KWV6f4jhTW2Sfn733mLNxNW24ZV7b66PNQRN6bc0ZWSPz5hW90931p4vY8vYW879JzZ9lgFYRN3DmyGKKjffYW2dTyqm5Pt4HsW5RXzSQ6Cl1NDW7R6Fp36jv6M8W3GFWhv2TscVYVX0XcT8NvCmQW4g52MN7fK_7JN9f6L_5Z3HhLW272dNG4KHBDnW5sy4JK4Zqfm6W7yJrsJ2TXrw1W7qRBls6VNRbgW3MVBG58sQ1ZCW4JtXbZ1Q8v3hW7NP3z94QC_BsW5twkY58k48DkW4DQstB7pYf1mW5pWnHN36vrkVW6BggPG6ZhJMDW4pQb911YwYqMN7h4sngnDLfcW6_spxf144-xnW5NNg5n7SZbk537dq1"&gt;webinar recording&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hf6nlkfn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/700/0%2A3tSMxzDeFZfgWh-K.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hf6nlkfn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/700/0%2A3tSMxzDeFZfgWh-K.png" alt="Foresight webinar cover" width="700" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create your  &lt;a href="https://app.runforesight.com/signup"&gt;free Foresight account&lt;/a&gt;  and start monitoring your GitHub CI pipelines and tests. You can reach out to the Foresight team via its  &lt;a href="https://discord.com/invite/bCtCmzP2ge"&gt;Discord community&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>management</category>
      <category>github</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Microservices Testing: A Quick Start Guide</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Tue, 08 Nov 2022 11:13:00 +0000</pubDate>
      <link>https://dev.to/kantarci/microservices-testing-a-quick-start-guide-183m</link>
      <guid>https://dev.to/kantarci/microservices-testing-a-quick-start-guide-183m</guid>
      <description>&lt;h2&gt;
  
  
  What is Microservices Testing?
&lt;/h2&gt;

&lt;p&gt;A microservices architecture creates an application as a collection of services. Each microservice works independently and uses application programming interfaces (APIs) to communicate with other services. Each microservice has its own data store and is deployed independently.&lt;/p&gt;

&lt;p&gt;Testing a microservices application requires a strategy that accounts not only for the isolated nature of microservices but also for service dependencies. This is why microservices testing processes often put each microservice in isolation to verify it is working properly and then test microservices together.&lt;/p&gt;

&lt;p&gt;Microservices testing is becoming a central part of continuous integration / continuous delivery (CI/CD) pipelines managed by  &lt;a href="https://cloud.netapp.com/devops"&gt;&lt;strong&gt;modern DevOps teams&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In this article, you will learn:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservices Testing Types&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Unit Testing&lt;/li&gt;
&lt;li&gt;  Contract Testing&lt;/li&gt;
&lt;li&gt;  Integration Testing&lt;/li&gt;
&lt;li&gt;  End-To-End Testing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Microservices Testing Strategy&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pick the High-Risk Services&lt;/li&gt;
&lt;li&gt;  Contract Testing&lt;/li&gt;
&lt;li&gt;  Use Service Virtualization&lt;/li&gt;
&lt;li&gt;  Test to a Service Level Agreement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Microservices Testing with Foresight&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Microservices Testing Types
&lt;/h2&gt;

&lt;p&gt;When developing a microservices architecture, there are several tests you can run to validate your application, including unit testing, contract testing, integration testing, end-to-end testing, and UI/functional testing.&lt;/p&gt;

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

&lt;p&gt;This type of testing helps you validate the performance of each component (or unit) of your software. A unit can be an object, a module, a procedure, function, or method. You can define the size of the unit but be advised that smaller units are the easiest to test. Furthermore, if you are struggling to define a unit test, consider it an indication your module should be broken down into smaller pieces.&lt;/p&gt;

&lt;p&gt;Ideally, developers should perform unit testing during the development phase, to ensure all code components are working properly and as designed. However, during rushed development or when teams are working in siloed phases, the quality assurance (QA) team may be required to perform unit testing — after the developers completed their work on the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Contract Testing
&lt;/h3&gt;

&lt;p&gt;To ensure that services can communicate, a contract defines the results or outputs expected for specific inputs. Consumer-contract testing ensures that each service call fulfills that contract, and that, even if the service itself changes internally, consumers will continue to receive the same results from that service.&lt;/p&gt;

&lt;p&gt;The service itself thus remains a black box. To test the contract, services are called independently and responses are verified. If there are service dependencies, they must operate as stubs that enable a service to function, but without interacting with other services. This will also prevent erratic behavior caused by external calls, putting the focus on testing a single service.&lt;/p&gt;

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

&lt;p&gt;An integration test collects microservices and tests them together as a subsystem. The goal is to verify that the microservices collaborate to achieve a joint operation. During the test, communication paths are exercised, making it possible to locate incorrect assumptions in each microservice, regarding interactions with its peers.&lt;/p&gt;

&lt;p&gt;Integration testing can also help you verify the interactions between microservices and external components. For example, you can use this type of test to verify that external data stores and caches are properly integrated, respond, and perform as expected.&lt;/p&gt;

&lt;h3&gt;
  
  
  End-To-End Testing
&lt;/h3&gt;

&lt;p&gt;The main goal of an end-to-end test is to verify that the entire application works to achieve its business objectives, regardless of the components making up the entire architecture. During end-to-end testing, the application is treated as a black box while tests exercise the system as it is fully deployed.&lt;/p&gt;

&lt;p&gt;End-to-end testing is especially important for microservices architecture, which is composed of many parts that attempt to achieve similar behaviors. An end-to-end test can help you ensure there are no gaps between microservices and all work towards achieving their goal. Ideally, the tests should verify messages pass correctly between services, and that network infrastructure, like firewalls and proxies, is properly configured.&lt;/p&gt;

&lt;h2&gt;
  
  
  3 Microservices Testing Strategies
&lt;/h2&gt;

&lt;p&gt;Here are three strategies you can use to make microservices testing more effective.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pick the High-Risk Services
&lt;/h3&gt;

&lt;p&gt;Continuous integration and continuous delivery (CI/CD) processes require automated testing. For microservices that must operate at a large scale, load testing is especially important, as are other types of testing that can be complex and time-consuming, such as integration testing and microservices security testing. However, these types of testing can take time and slow down the CI/CD pipeline.&lt;/p&gt;

&lt;p&gt;The solution is to identify high-risk microservices and test them extensively at the beginning of the cycle to reduce risks later on. This may require additional time, but it will be worthwhile by reducing issues later in the process. For low-risk microservices, heavier tests can be delayed until later in the process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Service Virtualization
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://www.runforesight.com/blog/difficult-mock-life"&gt;&lt;strong&gt;Dependencies can create bottlenecks&lt;/strong&gt;&lt;/a&gt;  if the code is ready but held back because a dependency is pending delivery. You can use service virtualization to avoid this delay.&lt;/p&gt;

&lt;p&gt;Service virtualization lets you mock out a service. First, you need to create a microservice containing the required URLs. Next, the URLs can accept data and respond according to the microservice specification. Note that response can be limited in scope.&lt;/p&gt;

&lt;p&gt;Here is an example of an endpoint mockup response for  &lt;em&gt;/customers/{id}:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{  
"id": 567,  
"first_name": "Jane",  
"last_name": "Smith"  
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While the behavior is limited, the mockup does provide the consumable functionality of a dependency still under development.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test to a Service Level Agreement
&lt;/h3&gt;

&lt;p&gt;To ensure efficiency and collaboration throughout the development process, testers, developers, and relevant stakeholders need to be on the same page. You can make sure all collaborators are on the same page by creating a Service Level Agreement (SLA). Ideally, testers and developers should work together to create this document, and implement it with flexibility in mind.&lt;/p&gt;

&lt;h2&gt;
  
  
  Microservices Test Visibility with Foresight
&lt;/h2&gt;

&lt;p&gt;Testing microservices gets only harder as modern applications become much more distributed and asynchronous.  &lt;a href="https://www.runforesight.com/"&gt;&lt;strong&gt;Foresight&lt;/strong&gt;&lt;/a&gt;  is designed to help developers to  &lt;a href="https://github.com/marketplace/thundra-foresight"&gt;&lt;strong&gt;monitor and debug your tests&lt;/strong&gt;&lt;/a&gt;  with plug&amp;amp;play ease of use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a64y4BSl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1328/0%2A-Ww2N3gMAAf3-Kg2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a64y4BSl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1328/0%2A-Ww2N3gMAAf3-Kg2.png" alt="foresight ui" width="664" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using these tools, developers can shed a light on the test failures running on build machines and/or during the CI phase.  &lt;a href="https://app.runforsight.com/signup"&gt;&lt;strong&gt;Sign up with Foresight&lt;/strong&gt;&lt;/a&gt;  to get started with a better understanding of microservices testing.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>testing</category>
      <category>microservices</category>
    </item>
    <item>
      <title>pypa has started to monitor workflows and tests</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Wed, 26 Oct 2022 06:26:25 +0000</pubDate>
      <link>https://dev.to/kantarci/pypa-has-started-to-monitor-workflows-and-tests-2mi7</link>
      <guid>https://dev.to/kantarci/pypa-has-started-to-monitor-workflows-and-tests-2mi7</guid>
      <description>&lt;p&gt;World famous packaging and virtual env management tool pypa has started to monitor their GitHub Actions and see the results:&lt;br&gt;
&lt;a href="https://pypa.app.runforesight.com/repositories/github/pypa/pipenv/workflow-run/180087c7-e109-37be-8402-236691c00948/9092458891/tests"&gt;https://pypa.app.runforesight.com/repositories/github/pypa/pipenv/workflow-run/180087c7-e109-37be-8402-236691c00948/9092458891/tests&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They have almost 20 jobs on their main workflow. It looks very complex and windows tests looks a bit problematic 🤔&lt;/p&gt;

</description>
      <category>python</category>
      <category>devops</category>
      <category>github</category>
    </item>
    <item>
      <title>Built an observability power-up for GitHub Actions</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Wed, 28 Sep 2022 08:47:52 +0000</pubDate>
      <link>https://dev.to/kantarci/built-an-observability-power-up-for-github-actions-4dd7</link>
      <guid>https://dev.to/kantarci/built-an-observability-power-up-for-github-actions-4dd7</guid>
      <description>&lt;p&gt;GitHub Actions is great, but they fall short of answering crucial questions like;&lt;/p&gt;

&lt;p&gt;🆘 Which tests are blocking the CI?&lt;br&gt;
🤯 Which changed lines haven't been tested?&lt;br&gt;
💰 What is the most costly workflow?&lt;br&gt;
🔻 Is my workflow success rate decreasing&lt;/p&gt;

&lt;p&gt;That's why we have built Foresight&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Foresight 3.0 is &lt;a href="https://www.producthunt.com/posts/foresight-2"&gt;launched on ProductHunt today&lt;/a&gt;. The best CI observability tool in the market!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Foresight’s aim is to bring visibility into CI workflows and test runs, enabling developers to quickly debug CI, build, and test failures and latencies. Foresight’s test gap analysis helps you analyze the impact of the code changes to detect defects early in the release cycle. It prioritizes tests according to their importance, flakiness, and failure rates allowing you to create a unique and reliable test order.&lt;/p&gt;

&lt;p&gt;With the learnings we gained, Foresight started to expand its potential. To become a pioneer product to deliver high-quality software at speed, we are thrilled to introduce our brand new product to you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Highlights
&lt;/h2&gt;

&lt;p&gt;As code flows through your CI workflows, it is processed by plenty of different steps. Each step depends on various configurations and parts that change frequently. Even though your pipeline has a solid setup, it may slow you down while identifying the problems while you deploy to production.&lt;/p&gt;

&lt;p&gt;A common challenge for software organizations is ensuring that all stakeholders — developers, DevOps engineers, and SREs — have across-the-board visibility into the software delivery process. The reason you need workflow analytics is to identify issues and enhance the organization-wide visibility of your workflows.&lt;/p&gt;

&lt;p&gt;Foresight allows you to identify those in the quickest way to enable you to have better workflow operations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sD_xgHUM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bm0q9yidwcxk4wp1ql9k.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sD_xgHUM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bm0q9yidwcxk4wp1ql9k.gif" alt="Highlights" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Easy UI for workflow and test Troubleshooting
&lt;/h2&gt;

&lt;p&gt;GitHub Actions only provide you with the logs of the workflow steps. With Foresight, you can get more. After integrating Foresight’s GitHub Actions, you get process traces to understand what is happening when you trigger your workflow. If there is a K8S configuration change and your workflow started to fail, you will gain visibility into the kernel-level information. Then, you have critical metrics such as CPU, Memory, Disk, and Network.  &lt;/p&gt;

&lt;p&gt;The more complex workflows you have, the harder it is to use GitHub Actions. Imagine that you have 10 different workflows and each of them has 10 different jobs running your tests in different environments. This complexity requires a lot of troubleshooting failed or flaky tests. Besides, GitHub doesn’t provide any in-depth information such as the performance history of your tests. With Foresight, you can easily see every information you need for your tests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1TA5HGb9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yvio6hxx1x7g23no19l5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1TA5HGb9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yvio6hxx1x7g23no19l5.gif" alt="Test troubleshooting" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Change Impact Analysis
&lt;/h2&gt;

&lt;p&gt;Foresight correlates the changes to the codebase with the test coverage reports to determine how much of the changes are covered by the tests, empowering teams with clear quality risk metrics to facilitate the right change management process. Pull requests can be automatically approved or passed through reviews depending on the quality risk to ensure only high-quality builds are moved to production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vvNcUlcX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5gg5ict2l61ws4s8yfsi.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vvNcUlcX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5gg5ict2l61ws4s8yfsi.gif" alt="Change impact" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Rules
&lt;/h2&gt;

&lt;p&gt;It is currently hurdling to see the critical metrics of CI workflows and even not possible to set up rules and alerts for them on GitHub Actions.&lt;/p&gt;

&lt;p&gt;Foresight makes it possible to automatically notify your team on critical workflow and test metrics. And make sure your CI pipeline is always green. For example, when your workflow success drops down under 80%, you will be able to get a notification automatically.&lt;/p&gt;

&lt;p&gt;We have prepared some of the most common rule templates for you and keep on expanding the feature depth in this vertical.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1lw7h6nI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zwvqhgfu0htes5stf865.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1lw7h6nI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zwvqhgfu0htes5stf865.gif" alt="rules" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrations
&lt;/h2&gt;

&lt;p&gt;With the Slack and GitHub Actions PR comments, never miss a critical analysis. You will have Foresight's summary report for tests, changes, and steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing
&lt;/h2&gt;

&lt;p&gt;Foresight is 100% FREE for teams under 20 committers and also open-source projects. This means Foresight is accessible for most small and medium-scale organizations.&lt;/p&gt;

&lt;p&gt;Above 20 committers, each committer will be charged $9 per month.&lt;/p&gt;

&lt;p&gt;Foresight has flexible pricing that scales with your team. We have a committer-based pricing model. A committer is a real developer who commits a code in the last 30 days into a repository watched by Foresight. We use GitHub's official API to fetch the committers. We omit bots from your committer list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Celebrate Foresight 3.0 with us this September
&lt;/h2&gt;

&lt;p&gt;The very best CI observability tool in the market!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://runforesight.com"&gt;Check out now!&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>github</category>
    </item>
    <item>
      <title>Next.js + Playwright + GitHub Actions Boilerplate</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Thu, 04 Aug 2022 07:34:00 +0000</pubDate>
      <link>https://dev.to/kantarci/nextjs-playwright-github-actions-boilerplate-497d</link>
      <guid>https://dev.to/kantarci/nextjs-playwright-github-actions-boilerplate-497d</guid>
      <description>&lt;p&gt;A comprehensive Todo app with APIs and E2E tests with GitHub Actions enabled.&lt;/p&gt;

&lt;p&gt;See the repository: &lt;a href="https://github.com/burakkantarci/playwright-todo-app" rel="noopener noreferrer"&gt;https://github.com/burakkantarci/playwright-todo-app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This project is a boilerplate to demonstrate the usage of modern stacks together. The project stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js Todo App &lt;/li&gt;
&lt;li&gt;Playwright&lt;/li&gt;
&lt;li&gt;GitHub Actions&lt;/li&gt;
&lt;li&gt;Foresight&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;The tech stack market is expanding more and more and seeing everything in action is the easiest way to see the benefits. I decided to create a combination of Next.js, Playwright, GitHub Actions, and Foresight to create an E2E stack for a web application. &lt;/p&gt;

&lt;p&gt;All the external tooling is free; therefore, you don’t need to pay anything to try this stack.&lt;/p&gt;

&lt;p&gt;What will be the result&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Serverless Next.js based TODO application with Upstash, the simplest way of production ready web application.&lt;/li&gt;
&lt;li&gt;Playwright testing framework so works in any browser and any platform. It is lightweight and easy to adopt. We will implement JUnit so that we can generate a test report. &lt;/li&gt;
&lt;li&gt;GitHub Actions for creating a CI pipeline. Don’t need to explain GitHub, but GitHub Actions has 2000mins of free CI execution; therefore, it makes it easy to automate all your software workflows. &lt;/li&gt;
&lt;li&gt;Foresight provides full visibility and deep insights into the health and performance of your tests and CI/CD pipelines. We won’t just build the stack; we are going to make sure it works fast and efficiently.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setting up the Todo App
&lt;/h2&gt;

&lt;p&gt;I followed the &lt;a href="https://upstash.com/blog/nextjs-todo" rel="noopener noreferrer"&gt;Upstash's guide&lt;/a&gt; as a starting point because it is very minimalistic and easy to understand. &lt;/p&gt;

&lt;p&gt;Setting up a Next.js app is mandatory. If you have Next.js configured in the app, you can also use them. I recommend using the example above if you don’t have any prior setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up Playwright
&lt;/h2&gt;

&lt;p&gt;To initialize the Playwright, run the following command and select the configurations to get started:&lt;br&gt;
&lt;code&gt;npm init playwright@latest&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose JavaScript (you can also choose Typescript)&lt;/li&gt;
&lt;li&gt;Name of your Tests folder &lt;/li&gt;
&lt;li&gt;Add a GitHub Actions workflow to easily run tests on CI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the installation has finished, you will have the base Playwright setup. Your test will be under the tests folder, and you can see the simple GitHub Action &lt;code&gt;playwright.yml&lt;/code&gt; under the &lt;code&gt;.github&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;One thing to mention about the Playwright is they provide example test specs so that you can have an understanding of how it is working. &lt;/p&gt;
&lt;h2&gt;
  
  
  Writing our E2E test
&lt;/h2&gt;

&lt;p&gt;We will add an E2E test which will add a Todo item and Complete it. This spec will help us ensure our APIs and user interactions are working.  &lt;/p&gt;

&lt;p&gt;Create &lt;code&gt;add.spec.js&lt;/code&gt; file under the tests folder and paste the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="c1"&gt;// @ts-check&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;expect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@playwright/test&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;TODO_ITEMS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
 &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;buy some cheese&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;feed the cat&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;book a doctors appointment&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;beforeEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://localhost:3000/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;add a todo item&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

 &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;todoName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;TODO_ITEMS&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

 &lt;span class="c1"&gt;// Text input&lt;/span&gt;
 &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#todo&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;todoName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#todo&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;press&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Enter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

 &lt;span class="c1"&gt;// Make sure the list only has one todo item.&lt;/span&gt;
 &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.Home_card__2SdtB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toHaveText&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
   &lt;span class="nx"&gt;todoName&lt;/span&gt;
 &lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;complete a todo item&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

 &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;todoName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;TODO_ITEMS&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

 &lt;span class="c1"&gt;// Text input&lt;/span&gt;
 &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`.Home_card__2SdtB:has-text("buy some cheese")`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c1"&gt;// Make sure the list only has one todo item.&lt;/span&gt;
 &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.Home_card__2SdtB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nx"&gt;not&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toHaveText&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;todoName&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go to &lt;code&gt;playwright.config.js&lt;/code&gt; and disable the parallelization. This will help our tests work one by one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;/* Run tests in files in parallel */
 fullyParallel: false,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, you can test your web application in different browsers at the same time with Playwright. For our configuration, I used only chromium, but you can enable or disable it on the Playwright config file.&lt;/p&gt;

&lt;p&gt;Go to package.json and add a test script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;"test": "playwright test"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With that command, you will be able to run the test by the npm run test command in your terminal and in the GitHub Actions.&lt;/p&gt;

&lt;p&gt;Run your test and check whether your configuration works correctly so far. You should see an output similar to this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffar4jrjpulh6ackd0ekx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffar4jrjpulh6ackd0ekx.png" alt="Test execution output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a JUnit Report
&lt;/h2&gt;

&lt;p&gt;JUnit reporter produces a JUnit-style XML report. We will use test reporting to monitor the health of our test. This is essential for ensuring our Todo web app achieves an acceptable quality level. &lt;/p&gt;

&lt;p&gt;Go to &lt;code&gt;playwright.config.js&lt;/code&gt; and add the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;reporter: [ ['junit', { outputFile: 'results.xml' }] ],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run your tests, it will generate a file named &lt;code&gt;results.xml&lt;/code&gt; and it will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9blwr9md8m4skrf9bip6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9blwr9md8m4skrf9bip6.png" alt="Test report output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When there is an error, the reporter will include the error logs and messages as well. &lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring our GitHub Actions
&lt;/h2&gt;

&lt;p&gt;Push your code to a GitHub repository. The initial &lt;code&gt;playwright.yml&lt;/code&gt; action will help us to run our test in every commit and pull request. Your configuration should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Playwright Tests&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;main&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;master&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;
 &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;main&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;master&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="na"&gt;timeout-minutes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60&lt;/span&gt;
   &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
   &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v2&lt;/span&gt;
     &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;14.x'&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install dependencies&lt;/span&gt;
     &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm ci&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install Playwright Browsers&lt;/span&gt;
     &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npx playwright install --with-deps&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run Playwright tests&lt;/span&gt;
     &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npx playwright test&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/upload-artifact@v2&lt;/span&gt;
     &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;always()&lt;/span&gt;
     &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;playwright-report&lt;/span&gt;
       &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;playwright-report/&lt;/span&gt;
       &lt;span class="na"&gt;retention-days&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will be able to see your workflow runs as below if your Action works.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwzkw858o1zch9y2dobr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwzkw858o1zch9y2dobr.png" alt="GitHub actions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub Action works flawlessly to automate the works you have done manually. You don’t need to run &lt;code&gt;npm run test&lt;/code&gt; by yourself; GitHub Actions does it automatically when you commit a new code. However, GitHub Actions is not offering enough information about your tests and their performance. When they fail, you need to understand by finding them in a log pile in the workflow run details. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65kt5a1yhyfu0xznxd9x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65kt5a1yhyfu0xznxd9x.png" alt="Github action logs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will use Foresight to monitor our Tests. Disclaimer, I’m working for Foresight. It is free for all open-source projects. It requires a very simple configuration to start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring Foresight
&lt;/h2&gt;

&lt;p&gt;You can use &lt;a href="https://foresight.docs.thundra.io/step-by-step-guide" rel="noopener noreferrer"&gt;this guide&lt;/a&gt; for setting up your Foresight configuration. What you need to do is set up an account, install Foresight’s GitHub app and watch the repository that you’ve initiated for this tutorial.&lt;/p&gt;

&lt;p&gt;After watching this repository, you need to update your YAML file. You can remove the last step and add Foresight’s test kit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Playwright Tests&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;main&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;master&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;
 &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;main&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;master&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="na"&gt;timeout-minutes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60&lt;/span&gt;
   &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
   &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v2&lt;/span&gt;
     &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;14.x'&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install dependencies&lt;/span&gt;
     &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm ci&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install Playwright Browsers&lt;/span&gt;
     &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npx playwright install --with-deps&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run Playwright tests&lt;/span&gt;
     &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npx playwright test&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Foresight test kit&lt;/span&gt;
     &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;success() || failure()&lt;/span&gt;
     &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;runforesight/foresight-test-kit-action@v1&lt;/span&gt;
        &lt;span class="s"&gt;with&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;api_key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.FRS_PROD_API_KEY }}&lt;/span&gt;
       &lt;span class="na"&gt;test_format&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;JUNIT&lt;/span&gt;
       &lt;span class="na"&gt;test_framework&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;JEST&lt;/span&gt;
       &lt;span class="na"&gt;test_path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./results.xml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, we entered the format, framework, and path fields by the configuration we’ve created above. &lt;/p&gt;

&lt;p&gt;This action will automatically send your test report to Foresight, and Foresight will analyze your tests in the most user-friendly way. After updating your YAML, your workflow will run automatically, and you will be able to see your workflow run results as below in Foresight:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpih05e1930cfcplisreg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpih05e1930cfcplisreg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It looks very similar to GitHub Actions; however, it is powered up with unique features such as Change Impact Analysis and Highlights. Unlike GitHub’s messy log view, you can easily access your test results with a clean design. You can learn more about Foresight here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;I hope this project will be a toolkit for you to start an E2E-covered Next.js project. It is a basic application with APIs, Playwright tests, and GitHub Actions. &lt;/p&gt;

&lt;p&gt;With the help of Foresight and Upstash, you can power up your processes and get benefited from the latest tech stacks.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>testing</category>
      <category>playwright</category>
      <category>devops</category>
    </item>
    <item>
      <title>Does monitoring the status of all workflows / pipelines at once matter?</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Wed, 29 Sep 2021 07:46:30 +0000</pubDate>
      <link>https://dev.to/kantarci/does-monitoring-the-status-of-all-workflows-pipelines-at-once-matter-3mf9</link>
      <guid>https://dev.to/kantarci/does-monitoring-the-status-of-all-workflows-pipelines-at-once-matter-3mf9</guid>
      <description>&lt;p&gt;Hey everyone, &lt;/p&gt;

&lt;p&gt;GitHub doesn't provide a dashboard for your all Actions status. I saw some developers use README with badges, but it's not helpful in a global view of a true pipeline that I think most people are used to seeing. &lt;/p&gt;

&lt;p&gt;How do you solve this issue in your organization?&lt;/p&gt;

</description>
      <category>devops</category>
      <category>discuss</category>
    </item>
    <item>
      <title>What are the issues on maintaining open-source projects?</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Tue, 31 Aug 2021 13:26:44 +0000</pubDate>
      <link>https://dev.to/kantarci/what-are-the-issues-on-maintaining-open-source-projects-57m3</link>
      <guid>https://dev.to/kantarci/what-are-the-issues-on-maintaining-open-source-projects-57m3</guid>
      <description>&lt;p&gt;Hi Dev.to Fam,&lt;/p&gt;

&lt;p&gt;I was wondering what are the main issues you are having while you are maintaining your open-source project?&lt;/p&gt;

&lt;p&gt;Is your contributors checking the software-quality, test-quality? How do you keep your pipeline quality? &lt;/p&gt;

&lt;p&gt;Recently, I was digging into some public projects and seeing some badges on top of the readme files. It may turn into a garbage at some point. Do you think those badges are important for you while contributing to a project?&lt;/p&gt;

&lt;p&gt;Really curious about your thoughts &lt;/p&gt;

</description>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How many test runs has your company in a month?</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Fri, 30 Jul 2021 08:16:09 +0000</pubDate>
      <link>https://dev.to/kantarci/how-many-test-runs-has-your-company-in-a-month-3ca4</link>
      <guid>https://dev.to/kantarci/how-many-test-runs-has-your-company-in-a-month-3ca4</guid>
      <description>&lt;p&gt;Hey QA / Testing people,&lt;/p&gt;

&lt;p&gt;I'm wondering how many test runs has your company in a month?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>testing</category>
      <category>devops</category>
    </item>
    <item>
      <title>What is the things you do when tests fail on CI?</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Wed, 16 Jun 2021 06:29:22 +0000</pubDate>
      <link>https://dev.to/kantarci/what-is-the-things-you-do-when-tests-fail-on-ci-296a</link>
      <guid>https://dev.to/kantarci/what-is-the-things-you-do-when-tests-fail-on-ci-296a</guid>
      <description>&lt;p&gt;Hey everyone,&lt;/p&gt;

&lt;p&gt;Considering the importance of CI in the development cycle, gaining observability into the CI pipeline is getting more critical. Failed tests are a huge issue for the pipeline.&lt;/p&gt;

&lt;p&gt;What is the first thing you do when a test fails on CI? Checking logs? Re-running? Or etc?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;

</description>
      <category>testing</category>
      <category>devops</category>
      <category>microservices</category>
      <category>distributedsystems</category>
    </item>
    <item>
      <title>What are your testing struggles on microservices?</title>
      <dc:creator>Burak Kantarcı</dc:creator>
      <pubDate>Fri, 07 May 2021 12:13:12 +0000</pubDate>
      <link>https://dev.to/kantarci/what-are-your-testing-struggles-on-microservices-4f7k</link>
      <guid>https://dev.to/kantarci/what-are-your-testing-struggles-on-microservices-4f7k</guid>
      <description>&lt;p&gt;Testing a microservices application requires a strategy that accounts not only for the isolated nature of microservices but also for service dependencies. This is why microservices testing processes often put each microservice in isolation to verify it is working properly and then tests microservices together.&lt;/p&gt;

&lt;p&gt;What are the struggles are you having while you are testing microservices?&lt;/p&gt;

</description>
      <category>testing</category>
      <category>discuss</category>
      <category>microservices</category>
      <category>distributedsystems</category>
    </item>
  </channel>
</rss>
