<?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: Przemysław Paczoski</title>
    <description>The latest articles on DEV Community by Przemysław Paczoski (@kodziak).</description>
    <link>https://dev.to/kodziak</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%2F145974%2Fe0ac4119-27c1-4399-90d4-ac927011466c.png</url>
      <title>DEV Community: Przemysław Paczoski</title>
      <link>https://dev.to/kodziak</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kodziak"/>
    <language>en</language>
    <item>
      <title>Separate or project repository to store tests? Which, why, and when?</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Tue, 14 Dec 2021 09:39:42 +0000</pubDate>
      <link>https://dev.to/kodziak/separate-or-project-repository-to-store-tests-which-why-and-when-131a</link>
      <guid>https://dev.to/kodziak/separate-or-project-repository-to-store-tests-which-why-and-when-131a</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Oryginally published at: &lt;a href="https://kodziak.com/blog/separate-or-project-repository-to-store-tests-which-why-and-when"&gt;https://kodziak.com/blog/separate-or-project-repository-to-store-tests-which-why-and-when&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While starting to work with end-to-end tests, one of the first questions is where to store them. Alongside source code or in separate repository? Two solutions, both slightly different. Each of the approaches has their pros and cons – but which to choose?&lt;/p&gt;

&lt;p&gt;In this short article, I've tried to describe them both. They're different, and from your perspective you've to choose which one to use, which isn't simple at all. I believe that this could help you a bit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project repository
&lt;/h2&gt;

&lt;p&gt;Store tests alongside source code keeps everything in the same place. You've both app-related and tests-related stuff like tasks, workflows etc. in the same spot. It causes, that the developers could execute everything much easier than searching some commands in another repository. It closes the gap between the developers and test engineers (SDET's). There aren't any barriers.&lt;/p&gt;

&lt;p&gt;When the tests fail, it would fail on the programmer branch, so it'd be his job to maintain them. That's the mental shift when things are together. You wouldn't be responsible for bringing back the tests to love after every failure. Or find the person which going to fix them or the development is blocked.&lt;/p&gt;

&lt;p&gt;The point is, that storing everything in the same repository, there aren't any other “strange” place where some code checks the developer's job and makes it easier to maintain.&lt;/p&gt;

&lt;p&gt;What's more, when the newest feature change the application flow and breaks tests, you don't have problem with different versions of tests and app. They're synced because of the same repository. No concern with merges and only one thing which left would be to maintain them on the same branch as the feature is and push a complete working solution. The time when tests aren't compatible with the newest application version shouldn't exist.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example structure
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;application-repository&amp;gt;/&amp;lt;root&amp;gt;/app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;application-repository&amp;gt;/&amp;lt;root&amp;gt;/tests&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate repository
&lt;/h2&gt;

&lt;p&gt;When the test code is in “another” project, and it usually breaks — the developers probably won't care about it. It's going to be your job to maintain the tests and unstuck the blocker.&lt;/p&gt;

&lt;p&gt;Unfortunately, when the things are separated, it would reduce the collaboration between team members. If your organization have clear distinction between the developers and test engineers, a separate repository will widen that gap. One wouldn't work on each other solutions. That's really not a situation you should go. The most beneficial would be working together on both, the application code and tests, as a team.&lt;/p&gt;

&lt;p&gt;Imagine a situation. From the developer's perspective. You've created a feature which breaks some of them and want's to merge it, fast. Obvious is, the tests would fail, so you've to set up to another repository, maintain the tests and prepare request, or just merge the feature without properly working tests. It would create a gap because it's impossible to merge both, new versions of the code at the same time.&lt;/p&gt;

&lt;p&gt;In that scenario, each of the repositories going to have workflow according to its needs – which is good. It will separate the contexts, so the person which going to start working on one of the projects will have only things related to that. The application has tasks related to build and running the application, and in tests will contain jobs to set up the application under tests and execute them. But it has downsides too. It's just annoying to run the whole flow on local machines. You'll need to execute commands in different places, which bring up the complexity.&lt;/p&gt;

&lt;p&gt;Of course, I didn't say that only the test's repository has to contain tests – nah. The application should have their own. The developers should write unit tests alongside the source code and execute them in pipelines.&lt;/p&gt;

&lt;p&gt;Separating the repositories keeps more clean environment. Repositories contain only things it's concerned about. It's make easier to navigate on the daily basis. But there's a downside to this approach. You'll have more moving parts to your workflow, which makes things more complicated along the way. For example, with new developers, setup everything it's going to be a little more difficult in front of a situation, where everything is in one place.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example structure
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;application-repository&amp;gt;/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;tests-repository&amp;gt;/&lt;/code&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Project repository
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Increase ownership through the team,&lt;/li&gt;
&lt;li&gt;Closes the gap between the developers and test engineers,&lt;/li&gt;
&lt;li&gt;No problem with merging, you'll always have synced versions between tests and application,&lt;/li&gt;
&lt;li&gt;Everything app and tests related going to be in the same place.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Separate repository
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Decrease ownership through the team,&lt;/li&gt;
&lt;li&gt;Widen the gap between the developers and test engineers,&lt;/li&gt;
&lt;li&gt;Could be a situation where tests aren't working on newest application version,&lt;/li&gt;
&lt;li&gt;Cleaner environment, only things concerned about are in the repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reading the article and points above, it seems like a single repository is a straight winner. But it's just how it works for me, most of the time. It doesn't mean, that it's the best solution for your organization. It always depends – on your project architecture, company structure, how many people you have and how you're working as a test engineers.&lt;/p&gt;

&lt;p&gt;The best would be to talk to your teammates and decide as a team which could work better for you. Work together on that topic. I assumed that you have in-house test engineers. If not, then, probably you should choose a separate repository for the tests.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>javascript</category>
      <category>programming</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Six things you should consider while designing a test architecture</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Tue, 23 Feb 2021 14:20:55 +0000</pubDate>
      <link>https://dev.to/kodziak/six-things-you-should-consider-while-designing-a-test-architecture-35k3</link>
      <guid>https://dev.to/kodziak/six-things-you-should-consider-while-designing-a-test-architecture-35k3</guid>
      <description>&lt;p&gt;The beginning of automated tests in a project is easy and difficult at the same time. You can start smoothly, using base architecture, simple tests, etc - and it's gonna work! But... With growing architecture, solutions you'll take could be very hard to develop in the future.&lt;/p&gt;

&lt;p&gt;That's why, you should consider a few things, before the start. I want to show you the problems and solutions do they solve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Page Object Model
&lt;/h2&gt;

&lt;p&gt;POM - Page Object Model is a design pattern that is commonly used in test automation for avoiding code duplication and improve test maintenance.&lt;/p&gt;

&lt;p&gt;This model contains classes that represent web pages. You break down each page into a corresponded page class. This class contains locators (selectors) to web page elements and methods that perform actions on them.&lt;/p&gt;

&lt;p&gt;This fills the most common actions you'll be doing in test automation - find the element, fill the value, click the button. For small scripts, you can store selectors in the tests, but with growing suites, you'll face many duplications - that's bad, you don't want them. If one of the used selectors gonna change, you'll need to update every place, you've used it.&lt;/p&gt;

&lt;p&gt;And... POM is the solution. You'll create a separate class that all of the tests gonna use. Then, if any of the selectors change, you'll only have to update one place. It's faster for the person which updates it.&lt;/p&gt;

&lt;p&gt;But... There is another model of creating an architecture for automation tests. It's called App Actions. I've never tested it, so I can't recommend it, but here's a nice article about it - &lt;a href="https://www.cypress.io/blog/2019/01/03/stop-using-page-objects-and-start-using-app-actions/"&gt;click!&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Logging
&lt;/h2&gt;

&lt;p&gt;You should use a logging system to give the user (developer, or tester) enough information about what's happened in the tests while executing in a relatively short time. It's most possible, that you'll run your tests through a remote machine. If they fail, you need to know fast what's happened. Troubleshoot or reproduce failed tests with a stack trace and the latest assertion message only will be very hard.&lt;/p&gt;

&lt;p&gt;That's why you should design a logging system.&lt;/p&gt;

&lt;p&gt;A well-designed strategy will show the user step by step, what's happened in the test. In the project that I've worked on, we created a three-step strategy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;begin,&lt;/li&gt;
&lt;li&gt;info,&lt;/li&gt;
&lt;li&gt;end,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To do this quickly, we've used decorators (TypeScript only).&lt;/p&gt;

&lt;p&gt;For example (code base on puppeteer):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;logger&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$eval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&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;Result with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[BEGIN] - getText from: #email
[INFO] - getText result: sampleemail@gmail.com
[END] - getText from: #email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The assumption was simple. We want to know when the method starts, what's the result and when ends. We've used a method name and parameters as a recognizer. That comes out with well-structured logs, which helps us to know exactly what happened in test execution.&lt;/p&gt;

&lt;p&gt;Also, you can use these logs in your reporting system, which is described below.&lt;/p&gt;

&lt;p&gt;Another good idea to mention is to write custom, detailed assertion messages. For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Expect: 5, Received: 8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's saying not much. Without the context and knowledge of what the test is checking, it's hard to assume what's happened. You'll need to check it manually. But...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;We expect 5 elements on the listing, got 8.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's easy to read and clearly saying what's happened. From the message, you can easily assume where's the problem.&lt;/p&gt;

&lt;p&gt;Also, there are two more areas, where detailed messages could be helpful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;timeout exceptions - ex. internet connections problem,&lt;/li&gt;
&lt;li&gt;architecture exceptions - ex. DB connection, auth connection problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I believe, that having a proper logging system could make your work easier and speed up the troubleshooting process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test Data
&lt;/h2&gt;

&lt;p&gt;Most common action in your tests gonna be to fill the value within the data. But... You need to have, or generate it. It's one of the most time-consuming actions, but necessary.&lt;/p&gt;

&lt;p&gt;Let's split the data into two types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;static data - the one you store in database/repository/somewhere,&lt;/li&gt;
&lt;li&gt;dynamic data - the one you generate using tools like a faker, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using class patterns you can design a system that handles the data for you. Connections to a database or dynamically creating sensitive data (ex. from &lt;code&gt;faker.js&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Parallel Executions
&lt;/h2&gt;

&lt;p&gt;Parallelization is an automated process that automatically launches your actions simultaneously. The goal is to save execution time by distributing tests across available resources.&lt;/p&gt;

&lt;p&gt;Consider a situation. You have a big database. Execution time takes 50 minutes to complete. You have 50 tests, where one approximately takes 1 minute. Tests are isolated (if not, you need to work on them). Using 5 parallel executions, you can reduce the total testing time to 10 minutes.&lt;/p&gt;

&lt;p&gt;Fast, reliable tests are key to a stable product.&lt;/p&gt;

&lt;p&gt;One, the interesting out-of-the-box solution is &lt;a href="https://knapsackpro.com/"&gt;Knapsack Pro&lt;/a&gt;. It helps run your tests in a parallel efficient way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment Pipeline
&lt;/h2&gt;

&lt;p&gt;A deployment pipeline is a process, where you take the code from version control and make it available for the users in an automated way. The team, which works on a project, needs an efficient way to build, test, and deploy their work to the production environment. In old fashion way, this was a manual process, where there were few deployments per week, now it's a few per day/hour. A set of automated tools doing it for us.&lt;/p&gt;

&lt;p&gt;Imagine a problem. You have 50 tests and execution takes 50 minutes (without parallel executions). To test the fresh version of the code, the developers need to build an application locally and run the tests against it. And okay, the tests found an issue, so the user fixes the code and does it again. Hours and nervousness growing. I'm pretty sure, that after a few rounds they're not gonna use the tests. You don't want this.&lt;/p&gt;

&lt;p&gt;The solution is to use an automated deployment pipeline. It's designed especially for cases like this.&lt;/p&gt;

&lt;p&gt;Combining it with parallel executions, you will create an efficient, fast strategy, which gonna defend your production with the tests. Even better, if failed tests block the deployment. You'll never push broken code to the real users. 🥳&lt;/p&gt;

&lt;h2&gt;
  
  
  Reports
&lt;/h2&gt;

&lt;p&gt;Reporting is about documenting the process of test execution. They should combine a summary for the management and stakeholders. Also, should be detailed to give the developers feedback. Especially, when something fails.&lt;/p&gt;

&lt;p&gt;Consider a failed execution. Tests are running on a remote machine, and somehow, you need to know what exactly happened. Why they failed and what's broken. Access to plain logs could be painful in searching this one failed test. A well-created report should cover that.&lt;/p&gt;

&lt;p&gt;Each report could be different, but in my opinion, there are a few must-have metrics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;machine/environment name,&lt;/li&gt;
&lt;li&gt;total number of running tests,&lt;/li&gt;
&lt;li&gt;duration,&lt;/li&gt;
&lt;li&gt;list of all test cases with logs (steps from logging system) in toggle,&lt;/li&gt;
&lt;li&gt;test result (for every test case).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have I mentioned failed test executions and it's crucial to know what happened? 🥳 Constantly looking at a deployment pipeline dashboard or searching in logs isn't that efficient. A well-written report, mixed with the slack notification can speed up this process much.&lt;/p&gt;

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

&lt;p&gt;I've described six topics, which are really nice to consider in every mature test automation project. They solve problems, which you'll encounter on daily basis. By doing some coding and research, you'll easier your work and make the architecture expandable. Using a few hacks, you'll speed up your troubleshooting process and with automatically generated reports - you'll be as transparent as possible with your tests.&lt;/p&gt;

&lt;p&gt;I believe, that this knowledge will help you at the beginning of your journey.&lt;/p&gt;

&lt;p&gt;What's also good to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;base architecture - pattern to re-use base methods, create browsers,&lt;/li&gt;
&lt;li&gt;video recordings - record whole test session,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have a nice day! 🥳&lt;/p&gt;

</description>
      <category>testing</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Importance of CI/CD and parallelisation in test automation</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Mon, 01 Feb 2021 12:27:47 +0000</pubDate>
      <link>https://dev.to/kodziak/importance-of-ci-cd-and-parallelisation-in-test-automation-4d2f</link>
      <guid>https://dev.to/kodziak/importance-of-ci-cd-and-parallelisation-in-test-automation-4d2f</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Oryginally posted at: &lt;a href="https://kodziak.com/blog/importance-of-ci-cd-and-parallelisation-in-test-automation"&gt;https://kodziak.com/blog/importance-of-ci-cd-and-parallelisation-in-test-automation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Nowadays, products change very often. We're create new versions of applications on daily basis. That means we need to know fast if everything works. To achieve this, we could run tests manually before every release or...?&lt;/p&gt;

&lt;p&gt;Let's automate this process.&lt;/p&gt;

&lt;h2&gt;
  
  
  How can CI/CD help with test automation?
&lt;/h2&gt;

&lt;p&gt;Let's be honest. If we tell the developers "you need to run the tests manually", they probably won't do it too often. Why? Because they are time-consuming. The execution usually takes more than an hour. Maybe it will work a few times, but I'm pretty sure there will always be some kind of excuse. But that's life.&lt;/p&gt;

&lt;p&gt;Then we're coming to the problem that we don't want to merge untested code, ever. We want to run unit, integration, and end-to-end tests (of course, if we have all of them:)). In a convenient way of course. Without any extra work from the user.&lt;/p&gt;

&lt;p&gt;The worst we can do, is to make something dependant on us. Continuous processes require knowledge from the developers how to maintain the tests and that's very close to writing them. When we all work on one product, we're all responsible for its quality. And to achieve that, we should work closely, together. Who said that only testers could write E2E tests? Anyone from the development team can do it.&lt;/p&gt;

&lt;p&gt;Last but not least, in continuous processes we can block the deployment when a test suite fails. Then the author needs to fix the feature or maintain the tests, if changes affect them. Of course, deterministic tests are needed here, which we all know - is hard to reach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Loooong time execution...
&lt;/h2&gt;

&lt;p&gt;Yeah... The problem we all know. Many times I've heard that tests takes one or two hours to finish. &lt;/p&gt;

&lt;p&gt;We should avoid that.&lt;/p&gt;

&lt;p&gt;Try to stick with 10-20 minutes to execute the core ones. To reach that, we can use parallelisation.&lt;/p&gt;

&lt;p&gt;We can distinguish two types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run tests by groups,&lt;/li&gt;
&lt;li&gt;run multiple tests at a time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tests by groups
&lt;/h3&gt;

&lt;p&gt;First, we should split our tests by groups/criticality. Recently I've written an article about that: &lt;a href="https://kodziak.com/blog/what-is-smoke-sanity-regression-testing-how-to-ci-cd-with-them/"&gt;What is smoke, sanity, regression testing? How to CI/CD with them.&lt;/a&gt; I've split the tests by types. And with that, we could run the groups sequentially.&lt;/p&gt;

&lt;p&gt;For example, yours pipeline could looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UWPCk4LJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/continuous-pipe-diagram.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UWPCk4LJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/continuous-pipe-diagram.jpg" alt="continuous-pipe-diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An approach like that, makes sure that the most important user flows are always gonna work. Then, on production environment we could check these less important ones. That's fine, until we're aware that something could be broken.&lt;/p&gt;

&lt;p&gt;You'll secure our time-to-market, while still checking everything you're supposed to. &lt;/p&gt;

&lt;h3&gt;
  
  
  Multiple tests at a time
&lt;/h3&gt;

&lt;p&gt;Secondly, use parallel nodes. Basically, most of the tools are configured to run one test and then another. With a strong machine and properly configured tests you can run a few of them at a time.&lt;/p&gt;

&lt;p&gt;One of the out of the box tools which solves this problem, and makes the execution faster is &lt;a href="https://knapsackpro.com/"&gt;Knapsack Pro&lt;/a&gt;. A very good tool to get the best execution time you can imagine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Spread knowledge about tests
&lt;/h2&gt;

&lt;p&gt;But what if a test suite fails? What happens then? &lt;/p&gt;

&lt;p&gt;There are two solutions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you can always monitor what happened and try to find a solution,&lt;/li&gt;
&lt;li&gt;you can make it easier for people to get the information about what happened,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And I really love the second option.&lt;/p&gt;

&lt;p&gt;I think everyone who works on software should be able to write, maintain, and fix the tests. You're working together to deliver the best product quality you can. That means you should avoid the stereotypical division between testers and developers. You're working together, as a development team.&lt;/p&gt;

&lt;p&gt;You can also implement automatically generated reports. Showing people, business, and other stakeholders what the tests cover, builds trust. And the trust in tests is what you need.&lt;/p&gt;

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

&lt;p&gt;You should deliver the best product quality you can in reasonable time. It's good when you can do it fast and with fine user experience (our internal users). People won't run tests manually, so you should automate it. That's why you could use continuous processes.&lt;/p&gt;

&lt;p&gt;Combining it with parallelisation, you'll secure the time-to-market. &lt;/p&gt;

&lt;p&gt;Spreading knowledge about tests makes more people feel responsible for them. If something fails - someone from the team will need to fix or maintain it. The more people work on tests, the better these tests are.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>testautomation</category>
      <category>cicd</category>
      <category>parallelisation</category>
    </item>
    <item>
      <title>Who is a Quality Assurance Engineer and what should he know?</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Sun, 17 Jan 2021 16:34:14 +0000</pubDate>
      <link>https://dev.to/kodziak/who-is-a-quality-assurance-engineer-and-what-should-he-know-2d60</link>
      <guid>https://dev.to/kodziak/who-is-a-quality-assurance-engineer-and-what-should-he-know-2d60</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Oryginally posted at: &lt;a href="https://kodziak.com/blog/who-is-a-qa-engineer-and-what-should-he-know"&gt;https://kodziak.com/blog/who-is-a-qa-engineer-and-what-should-he-know&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Have you ever think about steps in the testing journey? Manual tester, QA, QA Engineer, Test Developer, SDET, TestOps? There are many ways you can develop in. But today, I want to stick with one - QA Engineer.&lt;/p&gt;

&lt;p&gt;What does exactly this person do? What are the responsibilities and requirements? What should he know to work efficiently on daily basis?&lt;/p&gt;

&lt;p&gt;I've summed up areas and described basing on daily tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a QA Engineer do?
&lt;/h2&gt;

&lt;p&gt;QA Engineer means Quality Assurance Engineer is a specialist whose activities are aimed to improve the software development process and product quality using engineering knowledge. Manual tests aren't optimal in most cases. QA engineers automate the most common cases, which saves us time and money.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;write, design, and execute automated tests,&lt;/li&gt;
&lt;li&gt;maximize test coverage,&lt;/li&gt;
&lt;li&gt;determine the priority for test scenarios,&lt;/li&gt;
&lt;li&gt;create execution plans for these scenarios,&lt;/li&gt;
&lt;li&gt;write documentation for automated processes,&lt;/li&gt;
&lt;li&gt;build automation frameworks,&lt;/li&gt;
&lt;li&gt;set up continuous integration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And to reach the QA Engineer job, you need to know various things. I've categorized and described them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Methodologies
&lt;/h2&gt;

&lt;p&gt;You'll be obligated to write, design, and execute automated tests. It means you have to know how to do it. Writing automation tests isn't something very different than you're doing manually. I mean, to write this one, you have to perform these steps manually. So you have to take exactly the same steps as a user, and write this as a script. Experience with manual testing will let you write these scripts better.&lt;/p&gt;

&lt;p&gt;From time to time, you'll also decide what's important, and what's not. What should be tested next, and how to maximize test coverage. Experience and knowledge about methodologies will help you with these decisions.&lt;/p&gt;

&lt;p&gt;The priority of scenarios? Another important topic. Creating complex test solutions, most sure you'll face a problem with them. What should we automate first and why? What should we run first? These are hard questions, but important. We should always focus on more important parts of the application. Because we don't want to show the user some unexpected behaviors, bugs, or unavailability of the website. They'll lose trust in our product, which we can't afford.&lt;/p&gt;

&lt;h2&gt;
  
  
  Programming language
&lt;/h2&gt;

&lt;p&gt;Writing tests, creating test frameworks and architecture is the same as with applications. To do this, you need to know a programming language.&lt;/p&gt;

&lt;p&gt;Some of the wanna-be test developers, decide to learn frameworks first. Without the proper programming knowledge, they're trying to write tests. Probably this gonna work, but this solution won't be maintainable so much. While growing, they will encourage more and more problems, because basics were created wrong. Fix these mistakes lately, will cost much more time and afford than proper planning.&lt;/p&gt;

&lt;p&gt;But language knowledge isn't in my opinion enough. You should also be familiar with the concepts of programming. KISS, YAGNI, DRY, SOLID - right now, they could sound for you like a buzz word, but believe me - you'll use them daily. Knowing them will give you the opportunity of creating more maintainable and better solutions.&lt;/p&gt;

&lt;p&gt;Sometimes you'll also need to pass framework methods. Instead of using a &lt;code&gt;page.click()&lt;/code&gt; you'll need to perform language native one. Sometimes, you'll need an API call that your test framework doesn't wrap up. You'll face many cases, where knowledge of the language is important.&lt;/p&gt;

&lt;p&gt;Languages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript/TypeScript,&lt;/li&gt;
&lt;li&gt;Java,&lt;/li&gt;
&lt;li&gt;C#,&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Test tools
&lt;/h2&gt;

&lt;p&gt;To write a test we're using test frameworks. These are tools set, out of the box, which gives you an easy way to control the browser. It means, writes a user like a scenario end's with a few methods. We don't have to reinvent a wheel, write from scratch integration with browser, etc.&lt;/p&gt;

&lt;p&gt;Tooling is important, but concepts are more. While you know one test framework, you can easily switch to another. Most of them are very similar, it's like with a programming language, while you know the concepts and knows how to program, a language is literally a tool.&lt;/p&gt;

&lt;p&gt;Example test frameworks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Playwright,&lt;/li&gt;
&lt;li&gt;Cypress,&lt;/li&gt;
&lt;li&gt;Selenium&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Processes
&lt;/h2&gt;

&lt;p&gt;One of the bigger challenges is to set up pipelines. Nowadays, we're using Continuous Integration practice. Design and build a whole process is a very valuable skill.&lt;/p&gt;

&lt;p&gt;You need to understand how deployment works, where you can run tests, how to do this?&lt;/p&gt;

&lt;p&gt;To reach this, be familiar with topics like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker,&lt;/li&gt;
&lt;li&gt;CI/CD - Gitlab, Jenkins,&lt;/li&gt;
&lt;li&gt;Cloud - AWS, Azure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's a role called TestOps which is a connection between operations and testing, but I think mature QA Engineers should know the basics about processes, to be able to set up them from scratch.&lt;/p&gt;

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

&lt;p&gt;QA Engineer role requires knowledge of many different areas. All of them affect the final solution, which with this knowledge will be better.&lt;/p&gt;

&lt;p&gt;Knowledge of these areas also allows you to develop in various roles. Dive into processes? You can go into the TestOps position. Development? Then pick SDET.&lt;/p&gt;

&lt;p&gt;Have a nice day! 🥳&lt;/p&gt;

</description>
      <category>qa</category>
      <category>qaengineer</category>
      <category>testing</category>
      <category>testautomation</category>
    </item>
    <item>
      <title>What is screenshot, UI, API, and performance testing?</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Mon, 28 Dec 2020 15:32:40 +0000</pubDate>
      <link>https://dev.to/kodziak/what-is-screenshot-ui-api-and-performance-testing-b95</link>
      <guid>https://dev.to/kodziak/what-is-screenshot-ui-api-and-performance-testing-b95</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Oryginally posted at: &lt;a href="https://kodziak.com/blog/what-is-screenshot-ui-api-performance-testing"&gt;https://kodziak.com/blog/what-is-screenshot-ui-api-performance-testing&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Building a product, we face the moment that we need more types of tests. Screenshot, UI, API, or Performance? There are many of them and every one is designed for other purposes.&lt;/p&gt;

&lt;p&gt;Every type is different, and can help us with other things. I think, most of them should occur in mature projects, but for sure - you should know all of them.&lt;/p&gt;

&lt;p&gt;So... What is...?&lt;/p&gt;

&lt;h2&gt;
  
  
  Screenshot testing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is screenshot testing?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Screenshot testing is a technique used by end-to-end testing which captures a screenshot from a given URL and then compares the result with an expected image.&lt;/p&gt;

&lt;p&gt;The most common usage of this type of test is to check if the user interface (UI) isn't broken and the page has been rendered properly.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why you should do them?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Coming from old internet explorer to newest version of chrome. Using mobile and desktop in various OS. It's hard to check everywhere if our application renders properly. Not to mention a problem, where the developer will break something accidentally. A simple change could destroy our design. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How you can do them?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You can capture bulk screenshots through different desktop and mobile devices running in the various OS. All of them, you can compare with an expected image (snapshot). If the test will pass, you can deploy a new version of the application, otherwise, with the designed flow, you can ask a manager or designer to accept or reject changes. A simple diagram, I've prepared below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment diagram
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ofXgqcoG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/screenshot-pipe-diagram.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ofXgqcoG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/screenshot-pipe-diagram.jpg" alt="screenshot-pipe-diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But there is one thing you need to remember. You need to work closely with designers and developers. It's their job to accept changes in UI or revert them to the developer if something's broken.&lt;/p&gt;

&lt;h3&gt;
  
  
  Popular tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://percy.io/"&gt;Percy.io&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bbc/wraith"&gt;Wraith&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HuddleEng/PhantomCSS"&gt;PhantomCSS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  UI testing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is UI testing?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;UI testing is a technique used by end-to-end testing whose main aspect is to check how the application handles user actions performed via input devices - mouse, keyboard, and others. Another one is to check if displayed elements on the page are interacting correctly.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why you should do them?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Imagine that by an accident, your application has a faulty UI element, which is core for your business. Your users won't be able to get what they want, book an appointment, or buy a book. You will lose money and for sure clients, because with no trust in the application - you can't build the value.&lt;/p&gt;

&lt;p&gt;By that, UI testing is fundamental. Tests will behave like a real user. Will interact with your application and check the output. What's better, they will do more than check the presentation layer. A complex test needs the business and data layer also working.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How you can do them?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There are various tools created for control browsers. Some of them, you will find at the end of this caption. These tools will give you the possibility to create a test, which behaviors should be designed as a real user. Running them every every deploy, you'll always know, if somethings break. Also, you can set up these tests in the deployment pipeline.&lt;/p&gt;

&lt;p&gt;But... Not all that's pretty. These tests are slow. By slow, I mean that everyone needs to load a page, interact with it, probably reload, etc. This takes time. Many tests, takes much time to create an output, so it's important to run only the core one. More about it, you'll find in my latest article - &lt;a href="https://kodziak.com/blog/what-is-smoke-sanity-regression-testing-how-to-ci-cd-with-them"&gt;click&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;For sure, you shouldn't give up on them. We always need to provide a complete working application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment diagram
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P0m5eTuJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/ui-tests-pipe-diagram.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P0m5eTuJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/ui-tests-pipe-diagram.jpg" alt="ui-tests-pipe-diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Popular tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.cypress.io/"&gt;Cypress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://playwright.dev/"&gt;Playwright&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.selenium.dev/"&gt;Selenium&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  API testing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is API testing?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The API testing is a set of actions, which includes sending calls to API to get output and validate the response against defined input parameters. They determine if the API returns the correct response or react correctly to failures or unexpected behavior. Instead of using standard user inputs, we use the software.&lt;/p&gt;

&lt;p&gt;They're different than UI testing because don't concentrate on the presentation layer and the feel of the application. The main point is to check the business layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why you should do them?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When you modify code in the backend, automated UI tests can be time-consuming and repetitive. With API testing we skip UI, which makes tests much faster. That's why we will know faster if our changes break business behavior.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How you can do them?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;These tests can run similarly to UI ones. The main aspect is that you need a freshly build API, then you can run tests and base on the result deploy the new version of the application, or reject changes.&lt;/p&gt;

&lt;p&gt;There are many various tools to perform API tests. Some of them, I've put below. Designing and writing API tests is crucial for business work. Especially, when your architecture is built on micro-services. You can check every one separately.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment diagram
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P0m5eTuJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/ui-tests-pipe-diagram.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P0m5eTuJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/ui-tests-pipe-diagram.jpg" alt="ui-tests-pipe-diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Popular tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.postman.com/"&gt;Postman&lt;/a&gt; + &lt;a href="https://learning.postman.com/docs/running-collections/using-newman-cli/command-line-integration-with-newman/"&gt;Newman (if you want to run collections from CLI)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/supertest"&gt;Supertest&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Performance testing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is Performance testing?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Performance testing is a non-functional testing technique that determines the speed, scalability, stability, and responsiveness of an application under a particular workload. The goal of this type of test is to evaluate application output, speed, data transfer velocity, network bandwidth usage, and response times.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why you should do them?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You need to know if application speed meets expectations on production. Performance is a key determinant of adoption, success, and productivity.&lt;/p&gt;

&lt;p&gt;Running them, you will identify performance-related bottlenecks, which affect the user and created a poor experience - where you lost money. Bottlenecks are a single point or component within a system's overall function, that holds back overall performance.&lt;/p&gt;

&lt;p&gt;You can also use them to compare two or more systems and identify the one that performs better.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How you can do them?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This is specified by organization and application. It depends on what you need and what the business considers most important.&lt;/p&gt;

&lt;p&gt;You can use some of the tools, which I've listed below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment diagram
&lt;/h3&gt;

&lt;p&gt;Researching this post I've found some interesting articles on how to build a pipeline with performance tests. I'm not sure if it's working well, but - why not to get a try?:)&lt;/p&gt;

&lt;p&gt;Here a few links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://techbeacon.com/app-dev-testing/how-build-performance-testing-pipeline"&gt;https://techbeacon.com/app-dev-testing/how-build-performance-testing-pipeline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://speedcurve.com/blog/performance-testing-in-ci-lets-break-the-build/"&gt;https://speedcurve.com/blog/performance-testing-in-ci-lets-break-the-build/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Popular tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://jmeter.apache.org/"&gt;Apache JMeter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://loadninja.com/"&gt;LoadNinja&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.smartmeter.io/"&gt;SmartMeter.io&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The listed types of tests has pros and cons. All of them are useful, and many you should have in your projects. Of course, everything depends on needs.&lt;/p&gt;

&lt;p&gt;We've discussed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Screenshot testing,&lt;/li&gt;
&lt;li&gt;UI testing,&lt;/li&gt;
&lt;li&gt;API testing,&lt;/li&gt;
&lt;li&gt;Performance testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope, that this article clarifies to you a bit which types could be useful where and for what we're doing them.&lt;/p&gt;

&lt;p&gt;Have a nice day! 🥳&lt;/p&gt;

</description>
      <category>testing</category>
      <category>testautomation</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to make your UI automation tests resilient to changes?</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Mon, 21 Dec 2020 23:23:47 +0000</pubDate>
      <link>https://dev.to/kodziak/how-to-make-your-ui-automation-tests-resilient-to-changes-3j2l</link>
      <guid>https://dev.to/kodziak/how-to-make-your-ui-automation-tests-resilient-to-changes-3j2l</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Oryginally posted at: &lt;a href="https://kodziak.com/blog/how-to-make-your-ui-automation-tests-resilient-to-changes"&gt;https://kodziak.com/blog/how-to-make-your-ui-automation-tests-resilient-to-changes&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using CSS selectors to get elements in end-to-end tests is the most common way (besides xpath), but it can also be tricky and hard to maintain. One day everything could work fine and another a CSS class could be renamed. Styles could change without touching the business flow and then we could have a problem - we'll need to maintain the tests. Of course, the developers could do those changes for us, but they don't know our scenarios, our tests etc. It would be time-consuming for them, because they don't always know if their changes could affect our tests. And for these problems, I think I might have a solution.&lt;/p&gt;

&lt;p&gt;But first let's talk about CSS a bit.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the common problems with CSS selectors?
&lt;/h2&gt;

&lt;p&gt;Imagine that one day, you had to write a very ugly selector. The element you wanted to use was nested and the only solution available was to base it on CSS classes and HTML structure. And then, a developer made a little refactor that removed some useless HTML tags, which were of course, used in your selector. But he didn't change the business flow. And guess what will happen? Yes, you're right! The test will fail. Your selector will be broken and will need maintenance.&lt;/p&gt;

&lt;p&gt;But let's take a step back and think about what are CSS classes designed for? For sure, not to use them in end-to-end tests. Why? Because they're designed to style elements. Everyday there might be changes in the application that don't affect the business flow - which is the most important part in end-to-end tests - but are related with class names changes. That hurts when we need to maintain a test that didn't involve any user flow changes.&lt;/p&gt;

&lt;p&gt;Two examples, one simple solution - find better a mechanism to get elements.&lt;/p&gt;

&lt;p&gt;What do I recommend? Read below!&lt;/p&gt;

&lt;h2&gt;
  
  
  Use &lt;code&gt;data-test-id&lt;/code&gt; for help!
&lt;/h2&gt;

&lt;p&gt;For sure, they're controversial but there are two main advantages of using them.&lt;/p&gt;

&lt;p&gt;First one is that they're bulletproof. What? I mean, when we use this attribute with an element, no matter if the developer changes the HTML structure or CSS classes, we still get what we want. Unless they remove the element or change the business flow, our test should work fine.&lt;/p&gt;

&lt;p&gt;And second, as you may notice, the developer will see that attribute while working with the code. It could help because they can notify us about possible changes or just maintain the tests if needed - using &lt;code&gt;data-test-id&lt;/code&gt; makes it easier find occurrences in tests. And if we have more people working on end-to-end tests we can build more reliable solutions. That's what we all want to achieve - always working product:)&lt;/p&gt;

&lt;p&gt;More about working closely with developers below:)&lt;/p&gt;

&lt;h2&gt;
  
  
  But should I use them everywhere?
&lt;/h2&gt;

&lt;p&gt;Nope. Only with the elements used in tests. We don't want a mess in the code where almost every element has this attribute and only a few of them is used in tests. We want to build trust towards the tests and somehow show the devs that their changes could break our work.&lt;/p&gt;

&lt;p&gt;Of course, we'll add some code, but with &lt;code&gt;babel&lt;/code&gt; or similar solution we'll get rid of &lt;code&gt;data-test-id&lt;/code&gt; on production version. Also, you can take a look at &lt;code&gt;facebook&lt;/code&gt; where these attributes are used;).&lt;/p&gt;

&lt;p&gt;A little bit of extra work can bring us many benefits.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the benefits of using them?
&lt;/h2&gt;

&lt;p&gt;For sure, we can build communication between us and developers. How? Talk. If they see this kind of attribute with an element they want to refactor, they have to maintain the test (in the best case) or just notify us that something could affect it. It's beneficial to know when something can break our tests before running them on testing environment. It'll build trust to the tests. They won't fail because of changes which don't affect the business flow. It will help all of us.&lt;/p&gt;

&lt;p&gt;The only thing we need to do is give the developers an opportunity and reason to maintain the tests.&lt;/p&gt;

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

&lt;p&gt;Code structure can always change and it shouldn't affect our tests unless the business flow changes. With selectors based on CSS it could. That's why we decided to go with &lt;code&gt;data-test-id&lt;/code&gt; which seems like a reliable solution.&lt;/p&gt;

&lt;p&gt;They have some shortcomings but overall I think there is more pros. If you use them you'll work closely with devs which could result in other interesting solutions:) Just remember to add them wisely - only in the elements you're using in tests:)&lt;/p&gt;

&lt;p&gt;Have a nice day! 🥳&lt;/p&gt;

</description>
      <category>testing</category>
      <category>testautomation</category>
      <category>frontend</category>
      <category>javascript</category>
    </item>
    <item>
      <title>What is smoke, sanity, regression testing? How to CI/CD with them.</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Sat, 12 Dec 2020 19:14:55 +0000</pubDate>
      <link>https://dev.to/kodziak/what-is-smoke-sanity-regression-testing-how-to-ci-cd-with-them-5djd</link>
      <guid>https://dev.to/kodziak/what-is-smoke-sanity-regression-testing-how-to-ci-cd-with-them-5djd</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Oryginally posted at: &lt;a href="https://kodziak.com/blog/what-is-smoke-sanity-regression-testing-how-to-ci-cd-with-them/"&gt;https://kodziak.com/blog/what-is-smoke-sanity-regression-testing-how-to-ci-cd-with-them/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With growing test architecture, we are facing various problems. Execution time, flakiness, duplicate test cases etc. Tests are becoming hard to manage and we may start to feel like writing and maintaining them is meaningless. &lt;/p&gt;

&lt;p&gt;While lurking on reddit I came across a discussion about test types. Then it hit me - why can't we categorize them and instead of one long run, perform them group by group? We won't lose any coverage, and we'll reduce time to market. 🥳&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of end-to-end tests
&lt;/h2&gt;

&lt;p&gt;Sticking to E2E tests only, after reading the reddit discussion and thinking about the topic, I've decided classify them into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;smoke testing,&lt;/li&gt;
&lt;li&gt;sanity testing,&lt;/li&gt;
&lt;li&gt;regression testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You probably already know the last group very well (if not → &lt;a href="https://www.softwaretestinghelp.com/regression-testing-tools-and-methods/"&gt;click here&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;Now let's dig into each of the types mentioned before.&lt;/p&gt;

&lt;h3&gt;
  
  
  Smoke testing
&lt;/h3&gt;

&lt;p&gt;The main characteristics of these tests are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They're performed to cover critical functionalities of the application (Priority1 scenarios),&lt;/li&gt;
&lt;li&gt;The objective is to verify "stability" of the application to continue with further testing,&lt;/li&gt;
&lt;li&gt;They're a subset of regression tests,&lt;/li&gt;
&lt;li&gt;They're like a general health check up,&lt;/li&gt;
&lt;li&gt;Failing these tests results in instant rejection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Simply speaking, smoke testing should cover the most critical parts, the ones that let us confirm that the applications is working and delivers business value.&lt;/p&gt;

&lt;p&gt;For example, this kind of scenario could be in this category:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[Netflix.com] User can log in, choose a tv series/movie and start watching.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sanity testing
&lt;/h3&gt;

&lt;p&gt;Next group is sanity tests, whose main aspects are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They're performed to check more detailed functionalities of the application (Priority2 scenarios),&lt;/li&gt;
&lt;li&gt;The objective is to verify "rationality" of the application to continue with further testing,&lt;/li&gt;
&lt;li&gt;They're a subset of regression tests,&lt;/li&gt;
&lt;li&gt;They're like a detailed health check-up,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In simple words, sanity tests should cover more specialized user actions.&lt;/p&gt;

&lt;p&gt;Here's an example of a scenario that falls into this category:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[Netflix.com] User can search for movies using search bar.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can imagine, sanity tests may have some test cases in common with smoke tests but also there are certain differences between these categories.&lt;/p&gt;

&lt;h3&gt;
  
  
  Regression testing
&lt;/h3&gt;

&lt;p&gt;Last but not least - regression tests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They're performed to check detailed functionalities of the application (Priority1 + Priority2 + Priority3 scenarios)&lt;/li&gt;
&lt;li&gt;The objective is to verify every existing feature of the application,&lt;/li&gt;
&lt;li&gt;Regression test cases should be well documented,&lt;/li&gt;
&lt;li&gt;They're like a comprehensive health check-up,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Simply speaking, regression tests should cover all the aspects of application - the important and less important ones. Executing regression tests should give us an overview that everything works properly.&lt;/p&gt;

&lt;p&gt;For example, a scenario that could be in this category is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[Netflix.com] User can open "more information" about a tv series/movie and choose genre.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Amount of tests by type
&lt;/h3&gt;

&lt;p&gt;Regression tests &amp;gt; Sanity tests &amp;gt; Smoke tests. &lt;/p&gt;

&lt;p&gt;And here's a visual representation of how the sets intersect.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qIFy2R97--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/e2e-test-types.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qIFy2R97--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/e2e-test-types.jpg" alt="https://kodziak.com/blog/e2e-test-types.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Arrange a deployment process based on test types
&lt;/h2&gt;

&lt;p&gt;I've worked with one test database and deployment process for a while, and I figured that it's not perfect and not bad, but as it grows, it needs some changes.&lt;/p&gt;

&lt;p&gt;Depending on the type of tests, we can choose the most important ones and those that are less important. As we all know, the most important ones are those that deliver the business value, so we have to check if those functionalities work as expected with every deploy. Based on these criteria we can design our deployment process.&lt;/p&gt;

&lt;p&gt;Working with an application based on CI/CD carries potential challenges such as designing a deployment process with automation testing. Because we don't want it to be long, we can categorize the tests, and run each group at a different time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xZVMWH8O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/e2e-test-types-graph.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xZVMWH8O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://kodziak.com/blog/e2e-test-types-graph.jpg" alt="https://kodziak.com/blog/e2e-test-types-graph.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, only smoke tests are run with each application deploy. This way we'll always know that the most important functionalities work.&lt;/p&gt;

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

&lt;p&gt;As the number of your tests grows, they become harder to maintain. Running all of them after every deployment consumes too much time. If you organize them into categories you will reduce time to market without losing any necessary coverage.&lt;/p&gt;

&lt;p&gt;How you categorize your tests depends on you. They don't necessarily need to be divided into smoke, sanity and regression categories. You can do it differently, for example, by criticality level. &lt;/p&gt;

&lt;p&gt;Automated testing in deployment process is a standard practice in modern software development, used by the best teams and companies. CI/CD should therefore depend on the results of our tests, which will ensure that the critical functionalities always work.&lt;/p&gt;

&lt;p&gt;Have a nice day! 🥳&lt;/p&gt;

</description>
      <category>testing</category>
      <category>devops</category>
      <category>codequality</category>
      <category>testautomation</category>
    </item>
    <item>
      <title>First steps with end-to-end testing using jest + playwright (puppeteer)</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Thu, 03 Dec 2020 19:06:46 +0000</pubDate>
      <link>https://dev.to/kodziak/first-steps-with-end-to-end-testing-using-jest-playwright-puppeteer-26b2</link>
      <guid>https://dev.to/kodziak/first-steps-with-end-to-end-testing-using-jest-playwright-puppeteer-26b2</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Oryginally posted at: &lt;a href="https://kodziak.com/blog/first-steps-with-e2e-testing-using-jest-playwright"&gt;https://kodziak.com/blog/first-steps-with-e2e-testing-using-jest-playwright&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This post is a continuation of the “&lt;a href="https://kodziak.com/blog/first-steps-with-test-automation"&gt;First steps with test automation&lt;/a&gt;” article.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Recently I wrote a post about my first steps with test automation. I tried to answer questions related to the topic and guide you where and what to search for (if you're interested - &lt;a href="https://kodziak.com/blog/first-steps-with-test-automation"&gt;click here!&lt;/a&gt;). Now, I want to expand on it with technical steps you need to take and show you how easily you can create a basic test with a real world example (my blog 🥳).&lt;/p&gt;

&lt;p&gt;We will create a base repository with &lt;strong&gt;Playwright&lt;/strong&gt; and &lt;strong&gt;JestJS&lt;/strong&gt; and write a basic test which will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load the blog page,&lt;/li&gt;
&lt;li&gt;Check if the blog title contains the author’s name,&lt;/li&gt;
&lt;li&gt;Check if the posts list isn't empty,&lt;/li&gt;
&lt;li&gt;Click on the first post title and check if it loaded correctly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To achieve it, I think you need a little more knowledge, so I split the article into three topics (+bonus):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What do I need to start with automation?&lt;/li&gt;
&lt;li&gt;Project setup with &lt;strong&gt;Playwright&lt;/strong&gt; and &lt;strong&gt;JestJS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Let's write an automated test&lt;/li&gt;
&lt;li&gt;Bonus: Test recorder!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before starting the game, here are some topics which you should be familiar with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic knowledge of JavaScript,&lt;/li&gt;
&lt;li&gt;You know how to use CLI and NPM/Yarn,&lt;/li&gt;
&lt;li&gt;You're familiar with HTML/CSS.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What do I need to start with automatization?
&lt;/h3&gt;

&lt;p&gt;First of all, you need a library/tool which allows you to control a browser using code. Today, I'll use NodeJS library called &lt;strong&gt;Playwright&lt;/strong&gt; (which is very similar to &lt;strong&gt;Puppeteer&lt;/strong&gt; – here you can find a nice article about the differences: &lt;a href="https://blog.logrocket.com/playwright-vs-puppeteer/"&gt;https://blog.logrocket.com/playwright-vs-puppeteer/&lt;/a&gt;) to automate our actions with an API. You need a tool like this to write tests that will imitate the behaviour of end user (behave like our clients).&lt;/p&gt;

&lt;p&gt;Basically, doing a test manually, you're using a mouse to click and scroll or a keyboard to fill in the forms. In automated tests, you're using a library API to do the same things but the browser is controlled by automation software, not a user.&lt;/p&gt;

&lt;p&gt;Next, we need assertions. &lt;strong&gt;Playwright&lt;/strong&gt; provides their own ones, but honestly – I've never used them. I like &lt;strong&gt;JestJS&lt;/strong&gt;, which, besides that, is a test runner, which gives you more opportunities to control the whole test base. With an easy way to do parallelisation or configs for dev/production envs, writing tests is only a pleasure 🥰.&lt;/p&gt;

&lt;p&gt;In summary, you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A library to control a browser → we'll use &lt;strong&gt;Playwright&lt;/strong&gt;,&lt;/li&gt;
&lt;li&gt;A test runner → we'll use &lt;strong&gt;JestJS&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Project setup with Playwright and JestJS
&lt;/h3&gt;

&lt;p&gt;So we will use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://playwright.dev/"&gt;Playwright&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jestjs.io/en/"&gt;JestJS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/playwright-community/jest-playwright"&gt;Jest-Playwright&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if you decided to stick with puppeteer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pptr.dev/"&gt;Puppeteer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/smooth-code/jest-puppeteer"&gt;Jest-Puppeteer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; When using puppeteer, you need to change selectors because the API is slighty different. In our basic test, it is enough to remove &lt;code&gt;css=&lt;/code&gt; part and change &lt;code&gt;waitForLoadState&lt;/code&gt; ⇒ &lt;code&gt;waitForNavigation&lt;/code&gt;. After those two changes, everything should work.&lt;/p&gt;

&lt;p&gt;Before we start writing our first automated test, we need to set up the repository:&lt;/p&gt;

&lt;p&gt;Let's initialize it first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;yarn init&lt;/code&gt; or &lt;code&gt;npm install&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then install the required dependencies:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;yarn install jest jest-playwright-preset playwright&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install jest jest-playwright-preset playwright&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And create two config files,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// jest.config.js&lt;/span&gt;
&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;preset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;jest-playwright-preset&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// jest-playwright.config.js&lt;/span&gt;
&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Describe which browsers we want to run&lt;/span&gt;
  &lt;span class="na"&gt;browsers&lt;/span&gt;&lt;span class="p"&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;chromium&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;firefox&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;webkit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;launchOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// If we want to run browsers in headless mode or not,&lt;/span&gt;
    &lt;span class="na"&gt;headless&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// If we want to have opened devtools from start&lt;/span&gt;
    &lt;span class="na"&gt;devtools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, we need to an execute script to our &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"jest"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you can &lt;code&gt;yarn test&lt;/code&gt; or &lt;code&gt;npm run test&lt;/code&gt; which will run all files matching &lt;code&gt;*.test.js&lt;/code&gt; names – but we don't have any tests yet 🙈&lt;/p&gt;

&lt;p&gt;One more thing that I added is &lt;code&gt;tests/&lt;/code&gt; directory where we will store our test.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's write an automated test
&lt;/h3&gt;

&lt;p&gt;First we need to know what we want to test 🙈&lt;/p&gt;

&lt;p&gt;I created a basic flow relating to my blog, which you're reading now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check if the blog title contains the author’s name,&lt;/li&gt;
&lt;li&gt;Check if the posts list isn't empty,&lt;/li&gt;
&lt;li&gt;Click on the first post title and check if it loaded correctly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the directory &lt;code&gt;tests/&lt;/code&gt; I added a file &lt;code&gt;example.test.js&lt;/code&gt;. And to make it easier for you, I coded the above scenario, adding comments line by line, describing what’s happening.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;blogPosts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

&lt;span class="nx"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Blog - kodziak.com/blog/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Will trigger methods before tests&lt;/span&gt;
  &lt;span class="nx"&gt;beforeAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Load blog page&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="nx"&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://kodziak.com/blog/&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="nx"&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;title should be "Blog | Przemysław Paczoski"&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Get website title&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// Compare title of current page&lt;/span&gt;
    &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Blog | Przemysław Paczoski&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="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should display list of blog posts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Get all blog posts as an array of objects&lt;/span&gt;
    &lt;span class="nx"&gt;blogPosts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$$eval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;css=.post&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;el&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;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.post-title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.post-description&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}));&lt;/span&gt;

    &lt;span class="c1"&gt;// Check if list length is greater than 0&lt;/span&gt;
    &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;blogPosts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toBeGreaterThan&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="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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;click on blog post should redirect to article&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Go to first blog post, there we're waiting to resolve all promises from array&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
      &lt;span class="c1"&gt;// Click oo .post-title css class element&lt;/span&gt;
      &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;css=.post-title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="c1"&gt;// Wait for networkidle event, promise resolves after event&lt;/span&gt;
      &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;waitForLoadState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;networkidle&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="c1"&gt;// Get title, content and href of current article&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;articleTitle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;articleContent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;articleHref&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
      &lt;span class="c1"&gt;// Get article title, we use here array destructuring&lt;/span&gt;
      &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$eval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;css=h2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
      &lt;span class="c1"&gt;// Get article content&lt;/span&gt;
      &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$eval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;css=.content&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="c1"&gt;// Get article href&lt;/span&gt;
      &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;]);&lt;/span&gt;

    &lt;span class="c1"&gt;// Destructuring first element from an blog posts array. First we use array destructuring and then object destructuring&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;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;blogPosts&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Compare title from posts list with current article's title&lt;/span&gt;
    &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;articleTitle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c1"&gt;// Check if the current article content includes description from posts list, compare output with boolean true&lt;/span&gt;
    &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;articleContent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nx"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c1"&gt;// Compare href from posts list with current article's href&lt;/span&gt;
    &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;articleHref&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After we finish coding our test, let's run it using the command &lt;code&gt;yarn test&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Playwright will open three browsers which we described earlier: &lt;code&gt;chromium&lt;/code&gt;, &lt;code&gt;firefox&lt;/code&gt;, &lt;code&gt;webkit&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And if everything goes well, we should see the following log:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d-y97lpL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s3-us-west-2.amazonaws.com/secure.notion-static.com/078899a2-7963-484e-a55c-3379ca482c54/Untitled.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d-y97lpL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s3-us-west-2.amazonaws.com/secure.notion-static.com/078899a2-7963-484e-a55c-3379ca482c54/Untitled.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/078899a2-7963-484e-a55c-3379ca482c54/Untitled.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that's it! We ran our tests positively in three different browsers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus: Test recorder!
&lt;/h3&gt;

&lt;p&gt;Lastly, a good way to start with test automation could be to use test recorders. Nice one, created with playwright is: &lt;a href="https://github.com/microsoft/playwright-cli"&gt;https://github.com/microsoft/playwright-cli&lt;/a&gt; which allows you to record your browser interactions and automatically generate a fully working code – an automated test with &lt;strong&gt;Playwright&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In this article, I wanted to show you how easy it is to automate a basic test scenario using tools such as &lt;strong&gt;Playwright&lt;/strong&gt; and &lt;strong&gt;JestJS&lt;/strong&gt;. I hope that will be a good start for you to explore this part of software engineering.&lt;/p&gt;

&lt;p&gt;After reading it, you should have learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What Playwright (Puppeteer) and JestJS are used for,&lt;/li&gt;
&lt;li&gt;How to set up a repository using those technologies,&lt;/li&gt;
&lt;li&gt;How to write a basic test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fully working, implemented code from this article can be found in my repository: &lt;a href="https://github.com/Kodziak/playwright-first-steps"&gt;https://github.com/Kodziak/playwright-first-steps&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have a nice day!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>First steps with functional test automation</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Tue, 01 Dec 2020 23:29:10 +0000</pubDate>
      <link>https://dev.to/kodziak/first-steps-with-functional-test-automation-21gc</link>
      <guid>https://dev.to/kodziak/first-steps-with-functional-test-automation-21gc</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally posted at &lt;a href="https://kodziak.com/blog/first-steps-with-test-automation"&gt;https://kodziak.com/blog/first-steps-with-test-automation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Starting your test automation journey isn't always as smooth as it should be. You may have a lot of questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do I have to be a manual tester before?&lt;/li&gt;
&lt;li&gt;What language should I start with?&lt;/li&gt;
&lt;li&gt;What framework/library should I pick?&lt;/li&gt;
&lt;li&gt;What to automate first?&lt;/li&gt;
&lt;li&gt;Where to search for information?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and probably many more. I'll try to answer all of them based on my experience and the steps I took when I started with automated functional tests.&lt;/p&gt;

&lt;p&gt;So my case was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;experience with manual tests,&lt;/li&gt;
&lt;li&gt;no programming background,&lt;/li&gt;
&lt;li&gt;the team wanted to start with test automation,&lt;/li&gt;
&lt;li&gt;the business was convinced that test automation would be useful.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And I’m going to write this article from that perspective.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I have to be a manual tester before?
&lt;/h3&gt;

&lt;p&gt;The short answer is: it would be helpful.&lt;/p&gt;

&lt;p&gt;I started my adventure as an intern manual tester and after quite a short time I moved to junior quality assurance position. The whole job was to perform and execute manual tests. I was doing it only for about half a year and then decided to go with automation. I knew that some regression cases could be easily automated and give me more time for other tests. And in my opinion it's a good place to start with automation. It will save you a lot of time for testing new features and probably shorten your time to market.&lt;/p&gt;

&lt;p&gt;When you start with manual tests first, you’ll most certainly learn how to write a good test case which is a very important skill. I mean, doing it manually you’re checking specific elements and behaviours of the application so with this knowledge it would be much easier to write good automated tests. If you skip the part of being a manual tester, you will have to catch up – so another topic for beginners:)&lt;/p&gt;

&lt;p&gt;That's why, in my opinion, it is important and could be very helpful to start as a manual tester, learn how to test, and then start with automation testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What programming language should I pick?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Like everything, it depends. When starting with test automation it’s good to have buddies in the team who could help you. It's possible if you're writing tests in the same language as they're using. I started like that and in my opinion this is the best way.&lt;/p&gt;

&lt;p&gt;So, you're working in a scrum team, you're writing front-end applications and you have to write UI tests without a programming background. Having those prerequisites, I would go with a language that my teammates know. Especially in the beginning, they could help you to set up the architecture and write the first test. From a developer’s perspective, learning how another framework/library works is kinda easy. And problems we could face may vary – a problem with framework and a variable not being passed, bad syntax or wrong if statement. Having a bunch of people that could help you in those situations is priceless.&lt;/p&gt;

&lt;p&gt;Another nice thing is that the whole team could write test scripts. We are all working to make the application as good as we can, so why couldn’t a developer update a test script after it was affected by his/her changes to UI. And having gone through a given test scenario, he/she could write a whole test. It would speed up our work and let us exchange knowledge. It's very beneficial when you're not the only person who can maintain the test base.&lt;/p&gt;

&lt;p&gt;We all want to have a bug free product (and we all know it's impossible).&lt;/p&gt;

&lt;h3&gt;
  
  
  What framework/library?
&lt;/h3&gt;

&lt;p&gt;Of course it depends on the programming language you have chosen. Here are the most popular solutions and combinations which I know (together with links to documentation):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Java ⇒ &lt;a href="https://www.selenium.dev/documentation/en/"&gt;Selenium&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;C# ⇒ &lt;a href="https://www.selenium.dev/documentation/en/"&gt;Selenium&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;JavaScript/TypeScript ⇒ &lt;a href="https://jestjs.io/docs/en/puppeteer"&gt;Jest&lt;/a&gt; + &lt;a href="https://pptr.dev/"&gt;Puppeteer&lt;/a&gt;, &lt;a href="https://www.cypress.io/"&gt;Cypress&lt;/a&gt;, &lt;a href="https://devexpress.github.io/testcafe/"&gt;TestCafe&lt;/a&gt;, &lt;a href="https://www.selenium.dev/documentation/en/"&gt;Selenium&lt;/a&gt;, &lt;a href="https://nightwatchjs.org/"&gt;Nightwatch&lt;/a&gt;, &lt;a href="https://www.protractortest.org/#/"&gt;Protractor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Python ⇒ &lt;a href="https://robotframework.org/"&gt;Robot Framework&lt;/a&gt;, &lt;a href="https://www.selenium.dev/documentation/en/"&gt;Selenium&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can notice that Selenium gives you the opportunity to write in almost any language you want. And overall it's a nice solution with another big plus: most of the problems you’ll face with it have already been solved on StackOverflow, which is very helpful in the beginning.&lt;/p&gt;

&lt;h3&gt;
  
  
  What to automate first?
&lt;/h3&gt;

&lt;p&gt;I've already mentioned manual testing and regression. As we all know, regression is kinda repeatable. Many times, we're doing the same cases all over again which is quite boring. Also, it requires quite some time: sometimes a few hours, sometimes days. So if we write all the cases as automated we could save a lot of time for feature tests and reduce time to market.&lt;/p&gt;

&lt;p&gt;Regression test cases aren't very dynamic either. I mean, we probably won't be changing half of the tests by deployment. They don't need much maintenance time.&lt;/p&gt;

&lt;p&gt;Reduced time to market is also an important thing related to automated regression testing. Doing it manually could take, for example, two days, and when we switch to automation, we could make it, for example, one hour. It's very beneficial for business, which could be an argument for starting the automation. And one hour is still a pretty long time, in my opinion. Using parallelization or other techniques we could shorten it down to a few minutes. But it depends – of course.&lt;/p&gt;

&lt;p&gt;So I would start with regression and probably with login test cases. It’s repeatable, well-known and not so hard.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Where to search for information?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I would stick to the official documentation, which is linked above, but you can also use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://stackoverflow.com/"&gt;stackoverflow.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.guru99.com/software-testing.html"&gt;https://www.guru99.com/software-testing.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.softwaretestinghelp.com/automation-testing-tutorial-1/"&gt;https://www.softwaretestinghelp.com/automation-testing-tutorial-1/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://medium.com/"&gt;medium.com&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are two aggregates of links and general websites which could be helpful. Honestly, most of the time I'm using the first two ones because typing any problem into Google will probably return a solution from StackOverflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;I hope I answered the given questions, but let's sum it up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do I have to be manual tester before?&lt;/strong&gt; → in my opinion, it’s very helpful but not necessary,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What language should I start with?&lt;/strong&gt; → pick the language that your team knows,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What framework/library should I pick?&lt;/strong&gt; → related to the chosen language, the list above,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What to automate first?&lt;/strong&gt; → regression tests and login test case are kinda nice to start with,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where to search for information?&lt;/strong&gt; → documentation + Google and StackOverflow for problems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's just my opinion based on my own experience. If I had to start with automation again, I'd do the same, with those prerequisites. But of course – you have to adjust these steps to your business, type of work, and the situation you’re in.&lt;/p&gt;

&lt;p&gt;Have a nice day!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why do most test engineers fail interviews?</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Sat, 21 Nov 2020 07:36:52 +0000</pubDate>
      <link>https://dev.to/kodziak/why-do-most-test-engineers-fail-interviews-4p4i</link>
      <guid>https://dev.to/kodziak/why-do-most-test-engineers-fail-interviews-4p4i</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally posted at &lt;a href="https://kodziak.com/blog/why-do-most-test-engineers-fail-interviews"&gt;https://kodziak.com/blog/why-do-most-test-engineers-fail-interviews&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Recently I had the pleasure of interviewing candidates for my QA team. Sometimes, they were hard. You may ask why so I'll try to explain. I hope that in the future we can teach and prepare wanna-be test engineers to pass every interview they want to:)&lt;/p&gt;

&lt;p&gt;Our roadmap for this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basics of the language&lt;/li&gt;
&lt;li&gt;Compatibility with the team&lt;/li&gt;
&lt;li&gt;Problem-solving&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Basics of the language
&lt;/h3&gt;

&lt;p&gt;In my opinion, knowing the basics of the language you want to use to write automated tests is quite important to write them well.&lt;/p&gt;

&lt;p&gt;Many wanna-be test engineers (and not only beginners) know how to write a test, but when it comes to creating a custom solution - it could be hard without the basics of the language. In my daily work I'm facing various problems. Sometimes I'm just writing tests, which is kinda repetitive and easy, but there’s been many situations when we had to create some custom solution to simplify our work (like our custom runner, based on &lt;code&gt;jest&lt;/code&gt; or &lt;code&gt;TestKeeper&lt;/code&gt; which is an application to handle tests by micro-services). In this situation, I'm pretty sure that they could write this, but the quality of the code would probably be awful and hard to maintain. It's not the point:)&lt;/p&gt;

&lt;p&gt;And to give you an example. One of my questions was very simple: what’s the difference between let, const, and var? It's a very basic question often asked in interviews. And you know what? Many of the candidates couldn't answer it. I was kinda shocked because it's like the first question from the Top Ten JS interview questions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compatibility with the team
&lt;/h3&gt;

&lt;p&gt;Another important aspect of the recruitment process is your compatibility with the team. I mean, if your approach and personality doesn't fit the team – you won't be processed to the next stages. And there’s nothing wrong with that. It's not your fault but you have to be aware of this.&lt;/p&gt;

&lt;p&gt;I'm mentioning this because for us, leaders, it's a very important topic when building the right team.&lt;/p&gt;

&lt;p&gt;But... I can give you some tips, what skills a good tester should have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;proactivity,&lt;/li&gt;
&lt;li&gt;problem-solving,&lt;/li&gt;
&lt;li&gt;business point of view,&lt;/li&gt;
&lt;li&gt;flexibility,&lt;/li&gt;
&lt;li&gt;quick learner,&lt;/li&gt;
&lt;li&gt;collaboration and social skills,&lt;/li&gt;
&lt;li&gt;communication skills,&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Problem-solving
&lt;/h3&gt;

&lt;p&gt;As you may have guessed, the quality that I particularly value is the problem-solving attitude. And it’s essential not only during the interview but also on a daily basis. But what does it mean?&lt;/p&gt;

&lt;p&gt;In my opinion, a good tester shouldn't be afraid of confronting problems. Sometimes people come to us and ask difficult questions – it's just daily work. We should try to face them and if at that moment we don't know the answer – ask around and try to find it. Probably this asking part will be connected with doing something so treat it as a challenge.&lt;/p&gt;

&lt;p&gt;In my recent interviews I met various candidates. Some of them, when given a task, tried to solve it, even if they haven’t encountered a similar problem before. The answer from another group was "I don't know", and it was wrong. I mean, when you don't have experience in a given topic, just say it and try to answer what you feel it could be. I'm not saying it's the best approach every time to every question but I really like it when someone tries to give an answer with their own words, just thinking about how it could work. We could at that moment recognize how each of the candidates handled challenges and problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Going through interviews is hard and most of the time – stressful. It's not a piece of cake but proper preparation before the talk should help you get the job. In my opinion, as I've written above, you have to go with a proper attitude and thorough knowledge of the language basics. But of course it's not everything, these are just the fundamentals you should have. The rest depends on the position you’re applying for, your seniority and experience.&lt;/p&gt;

&lt;p&gt;I hope this article gives you an idea of some basic problems which are easy to tackle and could boost your confidence in interviews.&lt;/p&gt;

&lt;p&gt;Useful articles to help you build your future career:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/docplanner-tech/few-things-to-remember-when-you-apply-for-a-job-44ac6c4efd8d"&gt;https://medium.com/docplanner-tech/few-things-to-remember-when-you-apply-for-a-job-44ac6c4efd8d&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fearlesssalarynegotiation.com/salary-expectations-interview-question/"&gt;https://fearlesssalarynegotiation.com/salary-expectations-interview-question/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have a nice day!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Set up special Github readme!</title>
      <dc:creator>Przemysław Paczoski</dc:creator>
      <pubDate>Sun, 20 Sep 2020 10:46:06 +0000</pubDate>
      <link>https://dev.to/kodziak/set-up-special-github-readme-3ifg</link>
      <guid>https://dev.to/kodziak/set-up-special-github-readme-3ifg</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally posted at: &lt;a href="https://kodziak.com/blog/set-up-special-github-readme"&gt;https://kodziak.com/blog/set-up-special-github-readme&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some time ago I hit an article, that Github added a special type of repository, the ones you see above (we'll make it better), where we can write something about us. I think, that's a great idea to show, what exactly I'm doing, and maybe... it could give me some movement to my initiatives?&lt;/p&gt;

&lt;p&gt;But there's one problem. I don't like writing about me, I just... don't. I can't do this right (but I'm writing a blog, huh).&lt;/p&gt;

&lt;p&gt;The good one is that Github gave us a basic template, where we just can edit some entries and voila, we'll have something similar as I have.&lt;/p&gt;

&lt;p&gt;If you're curious how to add this to your Github profile - read the whole article.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to create your own?
&lt;/h2&gt;

&lt;p&gt;You need to create a repository, but it's a special type. It has to be named as your GitHub account. So just go to &lt;a href="https://github.com/new"&gt;https://github.com/new&lt;/a&gt;, same as you'll have to create a normal repository, and when you'll type the name of your account (in my case it's &lt;code&gt;kodziak&lt;/code&gt;), you'll be greeted with a message telling you about this special repository.&lt;/p&gt;

&lt;p&gt;Highly recommend setting up this repository as a &lt;code&gt;private&lt;/code&gt; to avoid showing a messy/broken page in time you'll be working on it.&lt;/p&gt;

&lt;p&gt;Also, you can initialize base &lt;code&gt;README.md&lt;/code&gt; file, which will automatically appear in your profile.&lt;/p&gt;

&lt;p&gt;And voila - you have your own page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's make it awesome
&lt;/h2&gt;

&lt;p&gt;Doing research, I found some nice (nicer than mine, huh) showing pages. So I thought, why not make me more interesting?&lt;/p&gt;

&lt;p&gt;I solicited my page into categories. As you may know, I'm also a podcaster (I hope, you know if not, shame on you - I'm kidding), so I'll go with categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who am I?&lt;/li&gt;
&lt;li&gt;My core actions (like blog, podcast)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And at the footer - some of my social media, where you can connect and write to me (feel free, I'm always answering!).&lt;/p&gt;

&lt;h3&gt;
  
  
  Assumptions I go with
&lt;/h3&gt;

&lt;p&gt;I like emojis, so I'll go with like every header for a specific category that will contain one. I think it's the way we can add some colors and fun to this text.&lt;/p&gt;

&lt;p&gt;But conversely to emojis, I like simplicity, so I thought without adding so many colors, images, gifs, etc, because it just not my style. All the time, I'm trying to keep it simple, to show this nice guy/woman who will come to my profile, as many pieces of information as he/she can get in just a few seconds. Not distracting him/her by jumping ducks.&lt;/p&gt;

&lt;p&gt;Another rule I think you should stick is to make it short. No one wants to read long, boring texts (like this one). I'm a fan of short tips and tricks, wherein seconds I can get what I wanted - so I'm tried to keep my page in this style.&lt;/p&gt;

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

&lt;p&gt;Make it fun, simple, and short. But make it. I could help you.&lt;/p&gt;

&lt;p&gt;I hope, this article gave you knowledge on how to set up this and inspiration how can you improve (setup?) your page. If yes - feel free to write to me with a link, I'll put it there!&lt;/p&gt;

&lt;p&gt;Feel free to write to me with any topic 😇&lt;/p&gt;

&lt;p&gt;Have a nice day!&lt;/p&gt;

&lt;p&gt;In case you need inspiration, there are some interesting ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/WaylonWalker/WaylonWalker"&gt;https://github.com/WaylonWalker/WaylonWalker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/stephenajulu/stephenajulu"&gt;https://github.com/stephenajulu/stephenajulu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/kodziak/kodziak"&gt;https://github.com/kodziak/kodziak&lt;/a&gt; (it's mine)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>github</category>
      <category>beginners</category>
      <category>career</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
