<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Klaidas Lekavicius on Medium]]></title>
        <description><![CDATA[Stories by Klaidas Lekavicius on Medium]]></description>
        <link>https://medium.com/@klaidas.lekavicius?source=rss-3cb438c95561------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3kqhMQ8Rpk0XfOCd</url>
            <title>Stories by Klaidas Lekavicius on Medium</title>
            <link>https://medium.com/@klaidas.lekavicius?source=rss-3cb438c95561------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:03:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@klaidas.lekavicius/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How monitoring can identify your next production issue]]></title>
            <link>https://medium.com/revel-systems/how-monitoring-can-identify-your-next-big-production-issue-9a8a2b6a37c8?source=rss-3cb438c95561------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a8a2b6a37c8</guid>
            <category><![CDATA[alerts]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[datadog]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[revelsystems]]></category>
            <dc:creator><![CDATA[Klaidas Lekavicius]]></dc:creator>
            <pubDate>Tue, 05 Apr 2022 15:05:43 GMT</pubDate>
            <atom:updated>2022-04-05T15:09:29.253Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aqwVyOLppdcUA5nUKbjWOA.png" /></figure><p>Nowadays maintaining product uptime and resolving issues quickly is as important as it has ever been. Modern practices encourage shorter <a href="https://en.wikipedia.org/wiki/Systems_development_life_cycle">SDLC</a> iterations with an intention to receive feedback faster and gather data for future improvements. Reliable tests for the software are a must to have the necessary confidence in your next release, but having the ability to quickly spot and react to a production issue is just as important. <br>Self-organized development teams must be involved in the monitoring process and be ready to tackle any defect that disrupts the usual workflow.</p><p>Software development teams in <a href="https://revel.engineering/"><em>Revel Systems</em></a> are highly encouraged to choose and implement their own monitoring strategies from a variety of available tools, as long as the strategy ensures a way to actively monitor a service that is being developed. In this article, I’ll talk about a few general implementation details that our teams go through when defining monitoring and alerting resources for an actively maintained project. I’ll also mention the importance of monitoring the right things, encouraging developers to follow good practices, and keeping their software healthy.</p><h3><strong>What should be monitored? 🤔</strong></h3><p><strong>Everything that might cause an impact on the health of software should be monitored for early symptoms of an active production incident.</strong></p><p>Of course, this is quite a broad statement — there’s so much involved in modern software architecture these days that it’s hard to understand the whole scope. But there are definitely some areas that should be taken into consideration. Here are a few of them:</p><h4>Infrastructure 💻</h4><p>The heart in every running piece of software. Without a healthy infrastructure, there would be no healthy software, and this area easily becomes the most vital part of any monitoring stack. Depending on your application you might have one or more actively running resources that are either hosted on-site or in the cloud. Either way, the information about these resources should be extracted and actively tracked with the tools of your choice. Depending on the system that’s being supported, you might want to track the random access memory (RAM) and CPU usage, the number of requests that are currently being handled, latency, throughput, amount of free storage, etc.</p><p>You can sometimes hear people saying that infrastructure that is being hosted in the cloud doesn’t need to be actively monitored because the cloud provider is responsible for keeping the system stable. This is simply not true.<strong> Usually, the cloud provider is responsible for maintaining the hardware, but the owner of the resource should make sure to extract any useful information which could be used for maintaining the good health of the software.</strong> Cloud providers like <em>AWS</em> usually do a great job in giving the tools necessary to extract and track the metrics that are important.</p><h4>Logs 📔</h4><p>The practice to log the actions that are being taken by the software is important, but those logs are not very worthy if they&#39;re not monitored for any unexpected or unusual behavior.</p><p><strong>The most common way to organize logs is to track their severity.</strong> Usually, logs should be marked to represent either informational (<em>INFO</em>), warning (<em>WARN</em>), or error (<em>ERROR</em>) levels. Obviously, the latter two should be monitored and constantly reviewed. There’s a bunch of information on how to track these logs and most of the logging libraries already support severity levels out of the box.</p><h3>Monitoring and alerting pipeline with <em>Datadog</em> 🐾</h3><p>There are a lot of good monitoring tools that allow consolidating information from different services or providers, enabling developers to have a unified dashboard that reflects the status of a product. The monitoring tool of choice in <em>Revel Systems</em> is <a href="https://www.datadoghq.com/">Datadog</a>. Since most of our services are hosted on <em>AWS</em>, we have a sufficient monitoring pipeline that allows us to get monitoring information into our <em>Datadog</em> dashboards. More information about integrating <em>Datadog</em> with the majority of <em>AWS</em> services with the help of a lightweight forwarder <em>Lambda</em> function can be found <a href="https://docs.datadoghq.com/serverless/libraries_integrations/forwarder/">here</a>. Let us know if you want to see a more detailed monitoring pipeline preview and dive deeper into its architecture! 🙌</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vi228mTq02qMcXmHrWF4_Q.jpeg" /><figcaption>A simple monitoring pipeline architecture connected to <em>Datadog</em></figcaption></figure><p>Once you have metrics and logs in <em>Datadog</em> you can start defining areas that could be monitored and start consolidating them into <a href="https://docs.datadoghq.com/dashboards/">dashboards</a>. This is a great way to create a dedicated page where all metrics about a certain product could live. Dashboards provide a lot of flexibility because you can choose which metrics matter and emphasize them in your view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SRLZkge8FuM1RzqdDMsY4g.png" /></figure><p>Finally, you can configure <em>Datadog</em> <a href="https://docs.datadoghq.com/monitors/">monitors</a> to trigger on a certain threshold and inform you about it. Our go-to option is to have a dedicated <em>Slack</em> channel for monitoring alerts, which would be pinged when something happens. Information about configuring the <em>Datadog</em> integration in <em>Slack</em> can be found <a href="https://docs.datadoghq.com/integrations/slack/?tab=slackapplication">here</a>. <a href="https://www.pagerduty.com/"><em>PagerDuty</em></a> is another nifty tool that we use for occasions when the service needs to be monitored with an on-call schedule. It has many useful integrations, including <em>Datadog</em>! 🤙</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*fjcssN9ra03qtzTf8otYJg.png" /></figure><p>Also, communication is very important once a new alert is received. If we’re using a <em>Slack</em> monitoring channel to track alerts, we like to use emojis to show that we’re looking into the issue and explain the cause of it. A good old ✅ emoji is used to mark the incident as identified and taken care of. You could use Datadog tools to manage incidents as well or configure<em> PagerDuty </em>for an on-call schedule, but a simple messaging approach works just as great if your team is not very big and is properly aligned! 🤷‍♂️</p><h3>Motivation to monitor 💪</h3><p>Active monitoring won’t mean anything if there won’t be people that will be aware of the necessity to check the status of the system in a case when an alert pops up. Therefore, here are some of the common things we make sure are made when configuring alerts for services.</p><p><strong>Alert loudly on critical issues 🤫</strong></p><p>An easy mistake to make when starting to actively monitor your services is to have alert notifications on every single piece of infrastructure or system handling logic you have. <strong>As various monitoring channels are designed to push loud notifications to engineers, it is important to make sure that you’re sending information that is actually important to react on quickly and might make a major impact on the service’s health.</strong> Not following this rule will make it easier to miss important alerts, as people tend to react less to very frequent monitoring notifications if they are not meaningful. Though less critical monitoring data is also important to track for the longer-term health of the service, therefore consider them as a separate use case, and have a way to review them at least once or twice a <a href="https://www.scrum.org/resources/what-is-a-sprint-in-scrum">sprint</a>.</p><p><strong>Make alerts 👉 explicit 👈</strong></p><p>Ensuring that alert messages contain some explicit explanation and possible root causes will help to diagnose the problem faster within the engineering organization. Make sure to spend some more time analyzing the cause of the possible alert and write that information down in your monitoring channels or have links to documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EP0jJeGXneeZcPCuQ7ZB0Q.png" /><figcaption>An explicit alert with a possible underlying issue to investigate</figcaption></figure><p><strong>Review monitors periodically 🧐</strong></p><p>It’s also very important to keep your monitoring system up to date. Spend some time looking into dashboards and seeing if all metrics still make sense. Maybe there’s an alert configured to trigger under a certain type of error message, but the underlying logic was updated months ago and the alert is doomed to never trigger. Maybe there’s a metric that tracks the memory usage for a fixed amount, but the system has adopted an autoscaling solution and your monitoring might throw false positives. Keeping things updated helps engineers to understand the important things and not over-complicate themselves with monitors which might not be even relevant anymore.</p><h3>Have a monitoring strategy now, thank yourself later! 👏</h3><p>In <a href="https://revel.engineering/"><em>Revel Systems</em></a>, we take ownership over the development &amp; release process for any product we’re working on. Apart from thorough testing we also implement a good monitoring system which helps us to react instantly in case of emergency! 🚨</p><p>Stay tuned for some more content as we’re planning to continue sharing our best development practices here 🙌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a8a2b6a37c8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/revel-systems/how-monitoring-can-identify-your-next-big-production-issue-9a8a2b6a37c8">How monitoring can identify your next production issue</a> was originally published in <a href="https://medium.com/revel-systems">Revel Systems Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing clean Cypress tests]]></title>
            <link>https://medium.com/revel-systems/writing-clean-cypress-tests-eb663c3fd889?source=rss-3cb438c95561------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb663c3fd889</guid>
            <category><![CDATA[cypress]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Klaidas Lekavicius]]></dc:creator>
            <pubDate>Fri, 18 Dec 2020 07:47:26 GMT</pubDate>
            <atom:updated>2020-12-18T07:47:26.900Z</atom:updated>
            <content:encoded><![CDATA[<h3>Writing clean Cypress tests 🔧</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2b6GUbGjEF5Pm-WY45rWew.jpeg" /></figure><p>While writing Cypress tests at <a href="https://revelsystems.com/">Revel</a>, we try to ensure the same level of readability as in the actual source code of the project. Along with the flexibility to easily extend and refactor tests, the goal is to make Cypress tests easy to understand for new joiners as well as extend suites with new cases. To properly do that, we invested some time into preparing a developer-friendly solution to write code that can be extended with <strong>test identifiers </strong>built by reusable utility functions. Also, because most of the Cypress tests need to execute some common actions, we try to ensure the possibility to reuse most of them between tests, promoting <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">DRY</a>.</p><h3>Test identifiers</h3><p>As with most of the modern web applications, our project is created using <strong>reusable components</strong>, which ensure a similar look and feel for the consumer. To interact with HTML DOM elements from our Cypress tests, we decided to target elements with unique tracing properties that a testing framework can reference:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c469e69a333ab8efb173457d5a8e32d6/href">https://medium.com/media/c469e69a333ab8efb173457d5a8e32d6/href</a></iframe><p>Because reusable elements can appear in multiple places of the application, it was easy for Cypress to fail while trying to find them without any additional querying of parent elements. For that reason, we decided that each component can <strong>inherit </strong>an identifier from a parent component and add its own value to construct the tracing path.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1b67dbcb612ba58241cbb3c88d8974b/href">https://medium.com/media/b1b67dbcb612ba58241cbb3c88d8974b/href</a></iframe><p>This reusable identifiers structure gives us the following benefits:</p><ul><li>An identifier in an application can be built of multiple other identifiers, yet it will be always unique because it also contains a value from a parent component that’s rendering a child</li><li>When we want to inspect a particular element, we can easily search it in the DOM by using the identifier value. No need to fiddle around by identifying parent components that contain a needed element</li></ul><p>When the UI is being changed, we don’t need much effort to maintain the tests. Even if a button to <em>Login</em> the user changed its position from header to footer, at most we will need to update the identifier, and a test will pass!</p><p>Finally, writing a Cypress test is as simple as using predefined identifiers:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/76760451c6052ee8dbf093c8804d422b/href">https://medium.com/media/76760451c6052ee8dbf093c8804d422b/href</a></iframe><h3>Making tests DRY</h3><p>Readability and ability to <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">reuse code</a> is one of the most important values that we have while writing code, and things are no different with tests. If there’s some piece of code that can be common in testing, we make it a reusable utility:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc27f9cbf99d56ec224c4a6dc9c0a13b/href">https://medium.com/media/dc27f9cbf99d56ec224c4a6dc9c0a13b/href</a></iframe><p>This effort gives a tremendous reliability boost. Cypress tests are easy to read, almost like a true specifications document!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f0b5f036514b137027e3f153edb2e52/href">https://medium.com/media/1f0b5f036514b137027e3f153edb2e52/href</a></iframe><p>Cypress also provides an ability to create your own custom commands which are specific to your application and can be used everywhere. Cypress suggests <a href="https://docs.cypress.io/api/cypress-api/custom-commands.html#1-Don%E2%80%99t-make-everything-a-custom-command">not to make everything a custom command</a>, although our approach of taking certain elements out of the DOM gets way easier by having a custom getId command which can accept an identifier value:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4967815f965700137d7d43af7c29e7d/href">https://medium.com/media/d4967815f965700137d7d43af7c29e7d/href</a></iframe><h3>Conclusion</h3><p>Investing in time to make Cypress tests pretty and readable pays a lot in the long term. Newly joined team members usually can pick up work way faster, and the effort needed to add additional tests becomes much smaller! ❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb663c3fd889" width="1" height="1" alt=""><hr><p><a href="https://medium.com/revel-systems/writing-clean-cypress-tests-eb663c3fd889">Writing clean Cypress tests</a> was originally published in <a href="https://medium.com/revel-systems">Revel Systems Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ensuring quality in progressive web applications with Cypress]]></title>
            <link>https://medium.com/revel-systems/ensuring-quality-in-progressive-web-applications-with-cypress-4478a800122d?source=rss-3cb438c95561------2</link>
            <guid isPermaLink="false">https://medium.com/p/4478a800122d</guid>
            <category><![CDATA[revel]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[cypress]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Klaidas Lekavicius]]></dc:creator>
            <pubDate>Fri, 18 Dec 2020 07:45:42 GMT</pubDate>
            <atom:updated>2020-12-18T07:48:50.324Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_toRtn1WzCaM68bwpl9-A.jpeg" /></figure><p>We have all seen websites from the early 2000s. They usually didn’t look good, didn’t perform many actions without routing the user to a different URL, and mostly none of them had any intuitive interactions. Today’s modern web applications are very different from what we had back then — they adapt to the screen size that is being used to render the application, perform client-side rendering, and are capable of persisting state during and even after the session.</p><p>With the amount of complexity that a progressive web application can have, it’s important to make sure that it meets the expected quality standards.</p><p><em>That’s why we have QAs, right?</em> 🤔</p><p>Yes, but it will get harder to continue building features while making sure that other parts of the application are not impacted in a negative way.</p><p>There’s a lot of routes that a development team can take to ensure the stability of a web application, however, we realized that along with all those options, it’s also very important to perform tests that would replicate the normal usage as much as possible. We also understood that a regression testing time will keep increasing along with more features. Automated UI tests were an obvious solution. But we also wanted <strong>speed</strong> for quick release iterations, <strong>flexibility</strong> to extend our testing with more scenarios, and <strong>constant verification</strong> that the source code is stable to release.</p><p><em>Cypress looked like a tool that delivered just that, with a few caveats. </em>👨‍💻</p><p>While playing around with the tool to understand its effectiveness, we raised a few questions:</p><ul><li>How can we make tests faster so we could verify more frequently?</li><li>How can we make sure that the API contract with backend services will not break?</li><li>How should we write tests which would be resilient to UI modifications?</li></ul><p>In a group of a few articles, we will share our experience of using <em>Cypress</em> as a tool to test a progressive web application written with <em>TypeScript</em> and <em>React</em>, while <strong>mocking API responses with complete type safety</strong>. With some additional practices that we adopted during the development of new features, we started trusting Cypress as one of the add-on testing tools to ensure the quality user experience which is being delivered to the end-user.</p><p>Below you’ll find all stories which explain our Cypress journey, starting with tests readability and extension principles, up until data mocking solutions as well as advanced testing utilities. Happy reading! 📚</p><ul><li><a href="https://medium.com/revel-systems/cypress-mocking-graphql-requests-fc1afda4654">Cypress: Mocking GraphQL Requests</a></li><li><a href="https://medium.com/revel-systems/how-we-connect-redux-to-cypress-3dd4541d0e47">How we connect Redux to Cypress</a></li><li><a href="https://medium.com/revel-systems/writing-clean-cypress-tests-eb663c3fd889">Writing clean Cypress tests</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4478a800122d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/revel-systems/ensuring-quality-in-progressive-web-applications-with-cypress-4478a800122d">Ensuring quality in progressive web applications with Cypress</a> was originally published in <a href="https://medium.com/revel-systems">Revel Systems Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>