<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Karanfil Duygu Ozdemir on Medium]]></title>
        <description><![CDATA[Stories by Karanfil Duygu Ozdemir on Medium]]></description>
        <link>https://medium.com/@kduygu.ozdemir?source=rss-903cca54663------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XlDrnbX5Z8t5ffJsBjVVnw.png</url>
            <title>Stories by Karanfil Duygu Ozdemir on Medium</title>
            <link>https://medium.com/@kduygu.ozdemir?source=rss-903cca54663------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 21:12:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kduygu.ozdemir/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploring Playwright: Understanding Serial vs. Parallel Execution and Checking Images]]></title>
            <link>https://medium.com/insiderengineering/exploring-playwright-understanding-serial-vs-parallel-execution-and-checking-images-7533d5799508?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/7533d5799508</guid>
            <category><![CDATA[visual-regression-testing]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[playwright-test]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[test-automation]]></category>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Mon, 17 Feb 2025 07:01:46 GMT</pubDate>
            <atom:updated>2025-02-17T07:01:46.966Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lcNnVQyObgVNfhpt7I2eZw.png" /></figure><p>Web test automation is becoming essential for enhancing user experience and improving software quality. One popular tool in this field, Playwright, stands out for running fast and reliable browser tests. Two powerful features it offers are <strong>serial and parallel execution</strong> of tests, and <strong>visual verification</strong> capabilities. In serial execution, tests run one after another, while in parallel execution, multiple tests run simultaneously, saving significant time, especially for large test suites.</p><h3>Playwright Serial Execution</h3><ul><li>In Playwright, <strong>serial execution</strong> refers to running tests one after another, <strong>in sequence</strong>.</li><li>When you run tests in <strong>serial mode</strong>, they execute one at a time, waiting for the previous test to finish before the next one begins.</li><li>This is often used to avoid conflicts, especially if the tests share resources like databases, files, or environments.</li></ul><h3>Usage of Serial Mode</h3><p>You might use serial mode when:</p><ul><li><strong>Tests depend on a specific order</strong>: For example, you may have a test that creates data in a database, and another test that updates or deletes that data.</li><li><strong>Shared resources</strong>: If your tests interact with resources like APIs, databases, or files that could cause issues when accessed concurrently.</li><li><strong>Avoid race conditions</strong>: Serial mode can help prevent race conditions where multiple tests might affect each other by accessing or modifying the same resources at the same time.</li></ul><h3>Parallel Execution (Without Serial)</h3><ul><li>When tests are not run in <strong>serial mode</strong>, Playwright will execute them in <strong>parallel</strong> by default, meaning multiple tests can run at the same time.</li><li><strong>Parallel mode</strong> is much faster because tests are executed concurrently.</li><li>However, this can lead to issues if the tests share common resources or if they interfere with each other.</li></ul><h3>Difference Between Serial and Without Serial (Parallel Execution)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*zjfb6VS3UN21WlSO.png" /></figure><h3>Example Serial and Without Serial (Parallel Execution):</h3><p>Let’s say you want to test a simple scenario where you search for “QA Duygu” on LinkedIn using Playwright. I’ll show you both <strong>parallel</strong> and <strong>serial</strong> execution examples for two scenarios:</p><p>Searching for “QA Duygu” on LinkedIn.</p><p>Checking if the search results page contains the name “Duygu”.</p><p>Here’s how we can set up both <strong>parallel</strong> and <strong>serial</strong> tests.</p><h3>1. Parallel Execution Example (Default Mode)</h3><p>In <strong>parallel</strong> mode, these tests will run <strong>simultaneously</strong>, which is Playwright’s default behavior. This approach is faster but may cause issues if they are dependent on the same resource (in this case, LinkedIn’s search function).</p><pre>// tests/parallel.spec.ts<br>import { test, expect } from &#39;@playwright/test&#39;;<br>test(&#39;Search &quot;QA Duygu&quot; on LinkedIn&#39;, async ({ page }) =&gt; {<br>  await page.goto(&#39;https://www.linkedin.com&#39;);<br>  await page.fill(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;QA Duygu&#39;);<br>  await page.press(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;Enter&#39;);<br>  await page.waitForSelector(&#39;text=Duygu&#39;);<br>});<br>test(&#39;Check if search results contain &quot;Duygu&quot;&#39;, async ({ page }) =&gt; {<br>  await page.goto(&#39;https://www.linkedin.com&#39;);<br>  await page.fill(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;QA Duygu&#39;);<br>  await page.press(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;Enter&#39;);<br>  await page.waitForSelector(&#39;text=Duygu&#39;);<br>  const result = await page.locator(&#39;text=Duygu&#39;);<br>  expect(await result.count()).toBeGreaterThan(0);<br>});</pre><p>In this example:</p><ul><li>The two tests will run at the <strong>same time</strong>.</li><li>They both perform the search for <strong>“QA Duygu”</strong>, but because they’re running in parallel, LinkedIn may rate-limit or block too many concurrent requests from the same account/IP.</li></ul><h3>2. Serial Execution Example</h3><p>Now let’s see the <strong>serial execution</strong>. Here, we ensure that one test runs <strong>after the other</strong>, avoiding potential conflicts.</p><p>To run tests serially, you can use test.describe.serial().</p><pre>// tests/serial.spec.ts<br>import { test, expect } from &#39;@playwright/test&#39;;<br>test.describe.serial(&#39;LinkedIn Search for QA Duygu&#39;, () =&gt; {<br>  <br>  // Test 1: Searching &quot;QA Duygu&quot; on LinkedIn<br>  test(&#39;Search &quot;QA Duygu&quot; on LinkedIn&#39;, async ({ page }) =&gt; {<br>    await page.goto(&#39;https://www.linkedin.com&#39;);<br>    await page.fill(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;QA Duygu&#39;);<br>    await page.press(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;Enter&#39;);<br>    await page.waitForSelector(&#39;text=Duygu&#39;);<br>  });<br>  // Test 2: Checking if search results contain &quot;Duygu&quot;<br>  test(&#39;Check if search results contain &quot;Duygu&quot;&#39;, async ({ page }) =&gt; {<br>    await page.goto(&#39;https://www.linkedin.com&#39;);<br>    await page.fill(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;QA Duygu&#39;);<br>    await page.press(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;Enter&#39;);<br>    await page.waitForSelector(&#39;text=Duygu&#39;);<br>    const result = await page.locator(&#39;text=Duygu&#39;);<br>    expect(await result.count()).toBeGreaterThan(0);<br>  });<br>})</pre><p>In this serial example:</p><ul><li><strong>Test 1</strong> will search for <strong>“QA-Duygu”</strong>.</li><li>Once <strong>Test 1</strong> finishes, <strong>Test 2</strong> will start, performing the same search and validating that “Duygu” appears in the results.</li><li>Because the tests run in sequence, there’s no risk of conflicts or rate limits from LinkedIn’s side.</li></ul><h3>Differences Between Parallel and Serial Execution</h3><ol><li><strong>Parallel Execution</strong>:</li></ol><ul><li>Both tests run at the same time.</li><li>This is faster but can lead to issues with rate-limiting or shared resources (such as session tokens or search rate limits on LinkedIn).</li></ul><p><strong>2. Serial Execution</strong>:</p><ul><li>Tests run one after another.</li><li>It’s slower but avoids potential conflicts, such as exceeding LinkedIn’s rate limit or other concurrency-related issues.</li></ul><h3>Running the Tests</h3><p>To run the tests in <strong>parallel</strong> or <strong>serial</strong>, Playwright handles it automatically unless otherwise specified:</p><ul><li><strong>Parallel</strong>: This happens by default when running tests with npx playwright test.</li><li><strong>Serial</strong>: Defined by using test.describe.serial() inside the test file.</li></ul><p>By choosing <strong>serial</strong> mode, you can ensure that tests that interact with external resources (like LinkedIn search) won’t clash with each other.</p><p>In summary, <strong>serial</strong> mode ensures test isolation and prevents conflicts at the cost of speed, while parallel execution (without serial) offers faster execution but comes with the risk of test interference.</p><h3>Checking Images: A Step-by-Step Guide</h3><p>Let’s dive into the process of checking images on a webpage. For our example, we will create a script that verifies whether a specific image loads correctly on a web page. When testing a website, it’s essential to verify that images are not only present but also loading correctly. Here are a few reasons why checking images is important:</p><ol><li><strong>User Experience</strong>: Broken or missing images can negatively affect users’ experiences, affecting engagement and retention.</li><li><strong>Performance</strong>: Ensuring that images load quickly can enhance site performance and user satisfaction.</li><li><strong>Brand Integrity</strong>: Consistent and correctly displayed images are vital for maintaining brand identity and professionalism.</li></ol><h3>What is Pixelmatch?</h3><p>pixelmatch is a JavaScript library used for pixel-by-pixel comparison between two images, allowing you to detect differences. It is beneficial for visual regression testing, which ensures that the visual output of a web application or component has not changed over time. Here are some important features and uses of the pixelmatch library:</p><h3>Key Features</h3><p><strong>Pixel-by-Pixel Comparison</strong>: This method compares the pixel values of two images to determine which pixels are different. It includes comparing each pixel’s RGB value.</p><p><strong>Different Pixel Count</strong>: pixelmatch can return the number of pixels that differ between the two images, helping you understand the extent of visual changes.</p><p><strong>Sensitivity Adjustment</strong>: You can set a threshold for the comparison, allowing you to ignore very small color differences and prevent false positives.</p><p><strong>Visual Difference Output</strong>: It can generate a new image showing the differing pixels, allowing you to visually inspect which areas have changed.</p><h3>Use Cases</h3><ul><li><strong>Visual Regression Testing</strong>: Used to ensure that changes or updates made to your application do not affect its visual output.</li><li><strong>Screenshot Validation</strong>: Useful for checking that UI components render as expected.</li><li><strong>Automation Testing</strong>: This can be integrated into CI/CD processes for automated visual validation.</li></ul><h3>Example Usage</h3><p>Here’s a simple example of how to check for differences between two images:</p><pre>import * as fs from &#39;fs&#39;;<br>import { PNG } from &#39;pngjs&#39;;<br>import pixelmatch from &#39;pixelmatch&#39;;<br>async function compareImages(referenceImagePath: string, testImagePath: string, outputDiffPath: string) {<br>    // Read the two images<br>    const img1 = PNG.sync.read(fs.readFileSync(referenceImagePath));<br>    const img2 = PNG.sync.read(fs.readFileSync(testImagePath));<br>    // Get the dimensions of the images<br>    const { width, height } = img1;<br>    // Create a new PNG to store the differences<br>    const diff = new PNG({ width, height });<br>    // Compare the images<br>    const numDiffPixels = pixelmatch(img1.data, img2.data, diff.data, width, height, { threshold: 0.1 });<br>    // Log the number of different pixels<br>    console.log(`Different pixels: ${numDiffPixels}`);<br>    // Save the image showing the differences<br>    fs.writeFileSync(outputDiffPath, PNG.sync.write(diff));<br>}<br>// Usage example<br>const referenceImage = &#39;screenshot1.png&#39;; // Path to the reference image<br>const testImage = &#39;screenshot2.png&#39;;       // Path to the image to test<br>const outputDiff = &#39;diff.png&#39;;             // Path to save the diff image<br>compareImages(referenceImage, testImage, outputDiff).catch(err =&gt; console.error(err));</pre><p>Playwright’s serial and parallel execution modes cater to diverse testing needs, balancing speed and conflict resolution. Meanwhile, integrating image comparison via pixelmatch elevates visual regression testing, ensuring both functionality and aesthetic consistency. By combining these features, QA engineers can achieve faster, more reliable, and visually accurate testing outcomes.</p><p>If you liked this article, I recommend checking out t<a href="https://medium.com/insiderengineering/getting-started-with-playwright-a-simple-setup-guide-4359e7c6c669">his one</a> as well.</p><p>And remember to follow the <a href="https://medium.com/insiderengineering">Insider Engineering Blog</a> for more insightful articles. ✍️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7533d5799508" width="1" height="1" alt=""><hr><p><a href="https://medium.com/insiderengineering/exploring-playwright-understanding-serial-vs-parallel-execution-and-checking-images-7533d5799508">Exploring Playwright: Understanding Serial vs. Parallel Execution and Checking Images</a> was originally published in <a href="https://medium.com/insiderengineering">Insider One Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Playwright: A Simple Setup Guide]]></title>
            <link>https://medium.com/insiderengineering/getting-started-with-playwright-a-simple-setup-guide-4359e7c6c669?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/4359e7c6c669</guid>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Mon, 09 Dec 2024 07:01:44 GMT</pubDate>
            <atom:updated>2024-12-09T07:01:44.028Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KS3KNVUAY2V03kOjPin2_g.png" /></figure><p>Playwright, an advanced automation tool by Microsoft, is designed to test. modern web applications across different platforms. It supports cross-browser testing on Chromium, Firefox, and WebKit, making it ideal for ensuring that web applications function flawlessly on Windows, macOS, and Linux. Playwright is known for reducing inconsistencies between browsers, allowing for the creation of faster, more reliable tests. This guide will explore the capabilities of the Playwright and provide a detailed step-by-step setup process.</p><h3>Capabilities of Playwright</h3><ol><li><strong>Cross-Browser Compatibility</strong>: With Playwright, you can run tests across various browsers like Chromium, Firefox, and WebKit. This ensures your web application performs consistently across different platforms.</li><li><strong>Advanced Test Scenarios</strong>: The playwright allows for the simulation of complex user interactions, such as clicks, typing, and dragging. This enables you to automate sophisticated test scenarios, like purchasing on an e-commerce site.</li><li><strong>Capturing Visual Evidence</strong>: Playwright supports screenshot capture and video recording during tests, which is invaluable for diagnosing test failures and pinpointing issues.</li><li><strong>Responsive Design Testing</strong>: You can test how your application adapts to various screen sizes and resolutions, ensuring it functions well on mobile devices.</li><li><strong>API Testing</strong>: Playwright can also be used for testing backend services by sending and receiving HTTP requests. This allows you to validate not just the UI but also the underlying API endpoints.</li></ol><h3>Why We Chose Playwright?</h3><h4>Type Safety, Speed, and Familiarity for Efficient Testing</h4><p>One of the main reasons we chose Playwright is its <strong>direct support for TypeScript</strong>, which provides <strong>type safety</strong>. This allows us to catch potential type errors early and ensures a more robust structure in our projects. Its <strong>high performance</strong> accelerates our testing processes, shortening the development cycle. Moreover, the <strong>ease of use</strong> makes it an accessible solution for our team to learn and implement quickly. The <strong>low learning curve within the team</strong> enables everyone to adapt swiftly. Playwright also <strong>supports the technology and language stack we are familiar with</strong>, allowing us to leverage our existing knowledge. Additionally, the ability to <strong>write test cases in a structure similar to Jest</strong> ensures continuity in coding practices we are accustomed to. This flexibility enhances team productivity while minimizing the need for a new learning curve. With Playwright, we get both a secure and flexible environment for writing test scenarios. Its <strong>broad platform support</strong> ensures smooth browser testing across all environments.</p><p>One more reason we chose Playwright over Selenium is its <strong>unified driver support</strong>. In Selenium, you need to write code and set up configurations specific to each driver, which can be time-consuming. However, with Playwright, you can write tests for all supported browsers and drivers using a <strong>single API</strong> without requiring extra effort or configuration. This simplifies the process and makes cross-browser testing much more efficient.</p><h3>Step-by-Step Playwright Setup</h3><ol><li><strong>Install Node.js</strong><br>First, ensure that Node.js is installed on your system. You can download it from the <a href="https://nodejs.org/">official Node.js website</a>. After installation, confirm that both Node.js and npm are set up correctly by running:</li></ol><pre>node -v<br>npm -v</pre><p><strong>Creating a New Project</strong> To use Playwright in a project, you need to create a new Node.js project. You can do this by running the following commands:</p><pre>mkdir my-playwright-project <br>cd my-playwright-project <br>npm init -y</pre><p><em>These commands create a new directory, navigate into it, and generate a basic </em><em>package.json file.</em></p><p><strong>Installing Playwright</strong> After setting up your project, you can add Playwright as a dependency via npm:</p><pre>npm install @playwright/test</pre><p><em>This command installs Playwright in your project.</em></p><p><strong>Installing Browsers</strong> By default, Playwright downloads all supported browsers (Chromium, Firefox, WebKit). However, if you want to install only a specific browser, you can do so with the following command:</p><pre>npx playwright install chromium</pre><p><strong>Writing Your First Test</strong> Once Playwright is installed, you can create your first test. For example, here’s a simple test that performs a Google search:</p><pre>const { test, expect } = require(&#39;@playwright/test&#39;);<br>test(&#39;Google search for QA Karanfil Duygu and verify LinkedIn&#39;, async ({ page }) =&gt; {<br>    // Go to Google&#39;s homepage<br>    await page.goto(&#39;https://www.google.com&#39;);<br>    <br>    // Type &#39;QA Karanfil Duygu&#39; into the search input<br>    await page.fill(&#39;input[name=&quot;q&quot;]&#39;, &#39;QA Karanfil Duygu&#39;);<br>    <br>    // Press Enter to execute the search<br>    await page.press(&#39;input[name=&quot;q&quot;]&#39;, &#39;Enter&#39;);<br>    <br>    // Wait for search results to load<br>    await page.waitForSelector(&#39;h3&#39;);<br>    <br>    // Check if any result includes &#39;LinkedIn&#39;<br>    const results = await page.locator(&#39;a&#39;).allTextContents();<br>    const linkedInResult = results.some(result =&gt; result.includes(&#39;LinkedIn&#39;));<br>    // Assert that there is a LinkedIn link in the search results<br>    expect(linkedInResult).toBe(true);<br>});</pre><p><strong>Running the Test</strong> To run your test, use the following command:</p><pre>npx playwright test</pre><p><em>This command executes all test files located in the </em><em>tests directory.</em></p><p>Sharding in Playwright means splitting your tests into smaller parts and running them at the same time. This makes the tests finish faster.</p><h3>What Is Sharding in Playwright?</h3><p>Sharding tests in Playwright means dividing your test suite into smaller parts and running them in parallel on different machines or processes. This approach can save time by executing multiple tests at the same time. When you “shard” tests, you can configure Playwright to distribute the tests across various workers, ensuring that each worker gets a portion of the tests to run.</p><p>For example, if you have 100 tests and you set up 5 shards, each shard will run 20 tests. This method is especially useful for large test suites because it reduces the total time needed to complete all tests.</p><p>To shard tests in Playwright, you need to configure the test runner settings, specifying how many shards you want to create. The test runner will then automatically manage the distribution of tests across these shards.</p><p>Sharding is helpful in continuous integration (CI) environments where running tests faster is crucial. By using sharding, you can make your testing process more efficient and get quicker feedback on your code changes.</p><ul><li><strong>Speeding Up Tests:</strong> Using sharding, the Playwright can run tests in parallel. Instead of running one test after another, it runs many tests at once, which saves time.</li><li><strong>Better Use of Resources:</strong> Sharding lets your computer or server work more efficiently by using all its power to run tests at the same time.</li><li><strong>Easier to Handle Big Test Suites:</strong> If you have a lot of tests, sharding breaks them into smaller, easier-to-manage pieces.</li></ul><h3>How to Use Sharding</h3><pre>npx playwright test --workers=4</pre><ul><li>This command runs your tests with 4 workers in parallel.</li></ul><p><strong>Configuration File:</strong></p><p><em>This setup also runs your tests in parallel using 4 workers.</em></p><h3>In Short</h3><p>Sharding in Playwright helps you run tests faster by running many tests at the same time. It makes your testing process quicker and more efficient.</p><h3>Referencing the Playwright Documentation</h3><p>For more in-depth information and detailed guides on Playwright, you can refer to the official<strong> </strong><a href="https://playwright.dev/docs/intro"><strong>Playwright documentation</strong></a>. The documentation includes comprehensive information on all features, API references, and various use cases.</p><h3>Running Iterative Tests</h3><ul><li>&quot;scripts&quot; Section:</li><li>&quot;test&quot;: This runs the tests normally using Playwright&#39;s CLI command.</li><li>&quot;test:iterative&quot;: This script runs the tests iteratively. The loop runs the tests 5 times, printing the iteration number before each run. You can adjust {1..5} to the desired number of iterations.</li></ul><p>To run the iterative test, use the following command in your terminal:</p><pre>npm run test:iterative</pre><p>This will execute your tests in a loop, which can be particularly useful for identifying flaky tests or ensuring consistency across multiple runs.</p><p>package.json file that includes iterative test execution using Playwright. This setup is used @playwright/test with a script to run tests in a loop or with different configurations.</p><pre>{<br>  &quot;name&quot;: &quot;playwright-project&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;description&quot;: &quot;A Playwright project for QA Karanfil Duygu&quot;,<br>  &quot;main&quot;: &quot;index.js&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;test&quot;: &quot;npx playwright test&quot;,<br>    &quot;test:iterative&quot;: &quot;for i in {1..5}; do echo \&quot;Iteration $i\&quot;; npx playwright test; done&quot;<br>  },<br>  &quot;author&quot;: &quot;QA Karanfil Duygu&quot;,<br>  &quot;license&quot;: &quot;MIT&quot;,<br>  &quot;devDependencies&quot;: {<br>    &quot;@playwright/test&quot;: &quot;^1.0.0&quot;<br>  }</pre><p>Playwright is a robust and flexible tool that enables you to test your web applications under various scenarios. In this guide, you’ve learned how to set up Playwright from scratch and explored what you can achieve. By integrating Playwright into your projects, you can automate and enhance your testing processes effectively.</p><p>If you enjoyed this article, stay tuned for Part 2! We’ll dive even deeper into Playwright’s advanced features and best practices. In the meantime, feel free to explore more of our articles for similar <a href="https://medium.com/insiderengineering/running-automation-test-cases-with-codebuild-09f7c4e4b216">insights on testing</a> frameworks, development tools, and <a href="https://medium.com/insiderengineering/what-is-github-actions-workflows-f373d9037981">coding tips.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4359e7c6c669" width="1" height="1" alt=""><hr><p><a href="https://medium.com/insiderengineering/getting-started-with-playwright-a-simple-setup-guide-4359e7c6c669">Getting Started with Playwright: A Simple Setup Guide</a> was originally published in <a href="https://medium.com/insiderengineering">Insider One Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Playwright: Understanding Serial vs. Parallel Execution and Checking Images]]></title>
            <link>https://medium.com/@kduygu.ozdemir/exploring-playwright-understanding-serial-vs-parallel-execution-and-checking-images-5f9d58dfe183?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f9d58dfe183</guid>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 11:40:32 GMT</pubDate>
            <atom:updated>2024-11-13T11:40:32.243Z</atom:updated>
            <content:encoded><![CDATA[<p>Web test automation is becoming essential for enhancing user experience and improving software quality. One popular tool in this field, Playwright, stands out for running fast and reliable browser tests. Two powerful features it offers are <strong>serial and parallel execution</strong> of tests, and <strong>visual verification</strong> capabilities. In serial execution, tests run one after another, while in parallel execution, multiple tests run simultaneously, saving significant time, especially for large test suites.</p><h3>Playwright Serial Execution</h3><ul><li>In Playwright, <strong>serial execution</strong> refers to running tests one after another, <strong>in sequence</strong>.</li><li>When you run tests in <strong>serial mode</strong>, they execute one at a time, waiting for the previous test to finish before the next one begins.</li><li>This is often used to avoid conflicts, especially if the tests share resources like databases, files, or environments.</li></ul><h3>Usage of Serial Mode</h3><p>You might use serial mode when:</p><ul><li><strong>Tests depend on a specific order</strong>: For example, you may have a test that creates data in a database, and another test that updates or deletes that data.</li><li><strong>Shared resources</strong>: If your tests interact with resources like APIs, databases, or files that could cause issues when accessed concurrently.</li><li><strong>Avoid race conditions</strong>: Serial mode can help prevent race conditions where multiple tests might affect each other by accessing or modifying the same resources at the same time.</li></ul><h3>Parallel Execution (Without Serial)</h3><ul><li>When tests are not run in <strong>serial mode</strong>, Playwright will execute them in <strong>parallel</strong> by default, meaning multiple tests can run at the same time.</li><li><strong>Parallel mode</strong> is much faster because tests are executed concurrently.</li><li>However, this can lead to issues if the tests share common resources or if they interfere with each other.</li></ul><h3>Difference Between Serial and Without Serial (Parallel Execution)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*G3A7ZLEp04isRfmL.png" /></figure><h3>Example Serial and Without Serial (Parallel Execution):</h3><p>Let’s say you want to test a simple scenario where you search for “QA Duygu” on LinkedIn using Playwright. I’ll show you both <strong>parallel</strong> and <strong>serial</strong> execution examples for two scenarios:</p><p>Searching for “QA Duygu” on LinkedIn.</p><p>Checking if the search results page contains the name “Duygu”.</p><p>Here’s how we can set up both <strong>parallel</strong> and <strong>serial</strong> tests.</p><h3>1. Parallel Execution Example (Default Mode)</h3><p>In <strong>parallel</strong> mode, these tests will run <strong>simultaneously</strong>, which is Playwright’s default behavior. This approach is faster but may cause issues if they are dependent on the same resource (in this case, LinkedIn’s search function).</p><pre>// tests/parallel.spec.ts<br>import { test, expect } from &#39;@playwright/test&#39;;<br>test(&#39;Search &quot;QA Duygu&quot; on LinkedIn&#39;, async ({ page }) =&gt; {<br>  await page.goto(&#39;https://www.linkedin.com&#39;);<br>  await page.fill(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;QA Duygu&#39;);<br>  await page.press(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;Enter&#39;);<br>  await page.waitForSelector(&#39;text=Duygu&#39;);<br>});<br>test(&#39;Check if search results contain &quot;Duygu&quot;&#39;, async ({ page }) =&gt; {<br>  await page.goto(&#39;https://www.linkedin.com&#39;);<br>  await page.fill(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;QA Duygu&#39;);<br>  await page.press(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;Enter&#39;);<br>  await page.waitForSelector(&#39;text=Duygu&#39;);<br>  const result = await page.locator(&#39;text=Duygu&#39;);<br>  expect(await result.count()).toBeGreaterThan(0);<br>});</pre><p>In this example:</p><ul><li>The two tests will run at the <strong>same time</strong>.</li><li>They both perform the search for <strong>“QA Duygu”</strong>, but because they’re running in parallel, LinkedIn may rate-limit or block too many concurrent requests from the same account/IP.</li></ul><h3>2. Serial Execution Example</h3><p>Now let’s see the <strong>serial execution</strong>. Here, we ensure that one test runs <strong>after the other</strong>, avoiding potential conflicts.</p><p>To run tests serially, you can use test.describe.serial().</p><pre>// tests/serial.spec.ts<br>import { test, expect } from &#39;@playwright/test&#39;;<br>test.describe.serial(&#39;LinkedIn Search for QA Duygu&#39;, () =&gt; {<br>  <br>  // Test 1: Searching &quot;QA Duygu&quot; on LinkedIn<br>  test(&#39;Search &quot;QA Duygu&quot; on LinkedIn&#39;, async ({ page }) =&gt; {<br>    await page.goto(&#39;https://www.linkedin.com&#39;);<br>    await page.fill(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;QA Duygu&#39;);<br>    await page.press(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;Enter&#39;);<br>    await page.waitForSelector(&#39;text=Duygu&#39;);<br>  });<br>  // Test 2: Checking if search results contain &quot;Duygu&quot;<br>  test(&#39;Check if search results contain &quot;Duygu&quot;&#39;, async ({ page }) =&gt; {<br>    await page.goto(&#39;https://www.linkedin.com&#39;);<br>    await page.fill(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;QA Duygu&#39;);<br>    await page.press(&#39;input[aria-label=&quot;Search&quot;]&#39;, &#39;Enter&#39;);<br>    await page.waitForSelector(&#39;text=Duygu&#39;);<br>    const result = await page.locator(&#39;text=Duygu&#39;);<br>    expect(await result.count()).toBeGreaterThan(0);<br>  });<br>})</pre><p>In this serial example:</p><ul><li><strong>Test 1</strong> will search for <strong>“QA-Duygu”</strong>.</li><li>Once <strong>Test 1</strong> finishes, <strong>Test 2</strong> will start, performing the same search and validating that “Duygu” appears in the results.</li><li>Because the tests run in sequence, there’s no risk of conflicts or rate limits from LinkedIn’s side.</li></ul><h3>Differences Between Parallel and Serial Execution</h3><ol><li><strong>Parallel Execution</strong>:</li></ol><ul><li>Both tests run at the same time.</li><li>This is faster but can lead to issues with rate-limiting or shared resources (such as session tokens or search rate limits on LinkedIn).</li></ul><p><strong>2. Serial Execution</strong>:</p><ul><li>Tests run one after another.</li><li>It’s slower but avoids potential conflicts, such as exceeding LinkedIn’s rate limit or other concurrency-related issues.</li></ul><h3>Running the Tests</h3><p>To run the tests in <strong>parallel</strong> or <strong>serial</strong>, Playwright handles it automatically unless otherwise specified:</p><ul><li><strong>Parallel</strong>: This happens by default when running tests with npx playwright test.</li><li><strong>Serial</strong>: Defined by using test.describe.serial() inside the test file.</li></ul><p>By choosing <strong>serial</strong> mode, you can ensure that tests that interact with external resources (like LinkedIn search) won’t clash with each other.</p><p>In summary, <strong>serial</strong> mode ensures test isolation and prevents conflicts at the cost of speed, while parallel execution (without serial) offers faster execution but comes with the risk of test interference.</p><h3>Checking Images: A Step-by-Step Guide</h3><p>Let’s dive into the process of checking images on a webpage. For our example, we will create a script that verifies whether a specific image loads correctly on a web page. When testing a website, it’s essential to verify that images are not only present but also loading correctly. Here are a few reasons why checking images is important:</p><ol><li><strong>User Experience</strong>: Broken or missing images can negatively affect users&#39; experiences, affecting engagement and retention.</li><li><strong>Performance</strong>: Ensuring that images load quickly can enhance site performance and user satisfaction.</li><li><strong>Brand Integrity</strong>: Consistent and correctly displayed images are vital for maintaining brand identity and professionalism.</li></ol><h3>What is Pixelmatch?</h3><p>pixelmatch is a JavaScript library used for pixel-by-pixel comparison between two images, allowing you to detect differences. It is beneficial for visual regression testing, which ensures that the visual output of a web application or component has not changed over time. Here are some important features and uses of the pixelmatch library:</p><h3>Key Features</h3><p><strong>Pixel-by-Pixel Comparison</strong>: This method compares the pixel values of two images to determine which pixels are different. It includes comparing each pixel&#39;s RGB value.</p><p><strong>Different Pixel Count</strong>: pixelmatch can return the number of pixels that differ between the two images, helping you understand the extent of visual changes.</p><p><strong>Sensitivity Adjustment</strong>: You can set a threshold for the comparison, allowing you to ignore very small color differences and prevent false positives.</p><p><strong>Visual Difference Output</strong>: It can generate a new image showing the differing pixels, allowing you to visually inspect which areas have changed.</p><h3>Use Cases</h3><ul><li><strong>Visual Regression Testing</strong>: Used to ensure that changes or updates made to your application do not affect its visual output.</li><li><strong>Screenshot Validation</strong>: Useful for checking that UI components render as expected.</li><li><strong>Automation Testing</strong>: This can be integrated into CI/CD processes for automated visual validation.</li></ul><h3>Example Usage</h3><p>Here’s a simple example of how to check for differences between two images:</p><pre>import * as fs from &#39;fs&#39;;<br>import { PNG } from &#39;pngjs&#39;;<br>import pixelmatch from &#39;pixelmatch&#39;;<br><br>async function compareImages(referenceImagePath: string, testImagePath: string, outputDiffPath: string) {<br>    // Read the two images<br>    const img1 = PNG.sync.read(fs.readFileSync(referenceImagePath));<br>    const img2 = PNG.sync.read(fs.readFileSync(testImagePath));<br>    // Get the dimensions of the images<br>    const { width, height } = img1;<br>    // Create a new PNG to store the differences<br>    const diff = new PNG({ width, height });<br>    // Compare the images<br>    const numDiffPixels = pixelmatch(img1.data, img2.data, diff.data, width, height, { threshold: 0.1 });<br>    // Log the number of different pixels<br>    console.log(`Different pixels: ${numDiffPixels}`);<br>    // Save the image showing the differences<br>    fs.writeFileSync(outputDiffPath, PNG.sync.write(diff));<br>}<br>// Usage example<br>const referenceImage = &#39;screenshot1.png&#39;; // Path to the reference image<br>const testImage = &#39;screenshot2.png&#39;;       // Path to the image to test<br>const outputDiff = &#39;diff.png&#39;;             // Path to save the diff image<br>compareImages(referenceImage, testImage, outputDiff).catch(err =&gt; console.error(err));</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f9d58dfe183" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Playwright: A Simple Setup Guide]]></title>
            <link>https://medium.com/@kduygu.ozdemir/what-you-can-do-with-playwright-and-a-step-by-step-setup-guide-de1ad468e679?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/de1ad468e679</guid>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Fri, 16 Aug 2024 13:24:11 GMT</pubDate>
            <atom:updated>2024-09-18T14:18:23.663Z</atom:updated>
            <content:encoded><![CDATA[<p>Playwright, an advanced automation tool by Microsoft, is designed for testing modern web applications across different platforms. It supports cross-browser testing on Chromium, Firefox, and WebKit, making it ideal for ensuring that web applications function flawlessly on Windows, macOS, and Linux. Playwright is known for reducing inconsistencies between browsers, allowing for the creation of faster, more reliable tests. This guide will explore the capabilities of the Playwright and provide a detailed step-by-step setup process.</p><h4>Capabilities of Playwright</h4><ol><li><strong>Cross-Browser Compatibility</strong>: With Playwright, you can run tests across various browsers like Chromium, Firefox, and WebKit. This ensures your web application performs consistently across different platforms.</li><li><strong>Advanced Test Scenarios</strong>: Playwright allows for the simulation of complex user interactions, such as clicks, typing, and dragging. This enables you to automate sophisticated test scenarios, like making a purchase on an e-commerce site.</li><li><strong>Capturing Visual Evidence</strong>: Playwright supports screenshot capture and video recording during tests, which is invaluable for diagnosing test failures and pinpointing issues.</li><li><strong>Responsive Design Testing</strong>: You can test how your application adapts to various screen sizes and resolutions, ensuring it functions well on mobile devices.</li><li><strong>API Testing</strong>: Playwright can also be used for testing backend services by sending and receiving HTTP requests. This allows you to validate not just the UI but also the underlying API endpoints.</li></ol><h4>Step-by-Step Playwright Setup</h4><ol><li><strong>Install Node.js</strong><br>First, ensure that Node.js is installed on your system. You can download it from the <a href="https://nodejs.org/">official Node.js website</a>. After installation, confirm that both Node.js and npm are set up correctly by running:</li></ol><pre>node -v<br>npm -v</pre><p><strong>Creating a New Project</strong> To use Playwright in a project, you need to create a new Node.js project. You can do this by running the following commands:</p><pre>mkdir my-playwright-project <br>cd my-playwright-project <br>npm init -y</pre><p><em>These commands create a new directory, navigate into it, and generate a basic </em><em>package.json file.</em></p><p><strong>Installing Playwright</strong> After setting up your project, you can add Playwright as a dependency via npm:</p><pre>npm install @playwright/test</pre><p><em>This command installs Playwright in your project.</em></p><p><strong>Installing Browsers</strong> By default, Playwright downloads all supported browsers (Chromium, Firefox, WebKit). However, if you want to install only a specific browser, you can do so with the following command:</p><pre>npx playwright install chromium</pre><p><strong>Writing Your First Test</strong> Once Playwright is installed, you can create your first test. For example, here’s a simple test that performs a Google search:</p><pre>const { test, expect } = require(&#39;@playwright/test&#39;);<br><br>test(&#39;Google search for QA Karanfil Duygu and verify LinkedIn&#39;, async ({ page }) =&gt; {<br>    // Go to Google&#39;s homepage<br>    await page.goto(&#39;https://www.google.com&#39;);<br>    <br>    // Type &#39;QA Karanfil Duygu&#39; into the search input<br>    await page.fill(&#39;input[name=&quot;q&quot;]&#39;, &#39;QA Karanfil Duygu&#39;);<br>    <br>    // Press Enter to execute the search<br>    await page.press(&#39;input[name=&quot;q&quot;]&#39;, &#39;Enter&#39;);<br>    <br>    // Wait for search results to load<br>    await page.waitForSelector(&#39;h3&#39;);<br>    <br>    // Check if any result includes &#39;LinkedIn&#39;<br>    const results = await page.locator(&#39;a&#39;).allTextContents();<br>    const linkedInResult = results.some(result =&gt; result.includes(&#39;LinkedIn&#39;));<br><br>    // Assert that there is a LinkedIn link in the search results<br>    expect(linkedInResult).toBe(true);<br>});</pre><p><strong>Running the Test</strong> To run your test, use the following command:</p><pre>npx playwright test</pre><p><em>This command executes all test files located in the </em><em>tests directory.</em></p><p>Sharding in Playwright means splitting your tests into smaller parts and running them at the same time. This makes the tests finish faster.</p><h3>What Is Sharding in Playwright?</h3><p>Sharding tests in Playwright means dividing your test suite into smaller parts and running them in parallel on different machines or processes. This approach can save time by executing multiple tests at the same time. When you “shard” tests, you can configure Playwright to distribute the tests across various workers, ensuring that each worker gets a portion of the tests to run.</p><p>For example, if you have 100 tests and you set up 5 shards, each shard will run 20 tests. This method is especially useful for large test suites because it reduces the total time needed to complete all tests.</p><p>To shard tests in Playwright, you need to configure the test runner settings, specifying how many shards you want to create. The test runner will then automatically manage the distribution of tests across these shards.</p><p>Sharding is helpful in continuous integration (CI) environments where running tests faster is crucial. By using sharding, you can make your testing process more efficient and get quicker feedback on your code changes.</p><ul><li><strong>Speeding Up Tests:</strong> Using sharding, the Playwright can run tests in parallel. Instead of running one test after another, it runs many tests at once, which saves time.</li><li><strong>Better Use of Resources:</strong> Sharding lets your computer or server work more efficiently by using all its power to run tests at the same time.</li><li><strong>Easier to Handle Big Test Suites:</strong> If you have a lot of tests, sharding breaks them into smaller, easier-to-manage pieces.</li></ul><h3>How to Use Sharding</h3><pre>npx playwright test --workers=4</pre><ul><li>This command runs your tests with 4 workers in parallel.</li></ul><p><strong>Configuration File:</strong></p><p><em>This setup also runs your tests in parallel using 4 workers.</em></p><h3>In Short</h3><p>Sharding in Playwright helps you run tests faster by running many tests at the same time. It makes your testing process quicker and more efficient.</p><h4>Referencing the Playwright Documentation</h4><p>For more in-depth information and detailed guides on Playwright, you can refer to the official<strong> </strong><a href="https://playwright.dev/docs/intro"><strong>Playwright documentation</strong></a>. The documentation includes comprehensive information on all features, API references, and various use cases.</p><h4>Running Iterative Tests</h4><ul><li>&quot;scripts&quot; Section:</li><li>&quot;test&quot;: This runs the tests normally using Playwright&#39;s CLI command.</li><li>&quot;test:iterative&quot;: This script runs the tests iteratively. The loop runs the tests 5 times, printing the iteration number before each run. You can adjust {1..5} to the desired number of iterations.</li></ul><p>To run the iterative test, use the following command in your terminal:</p><pre>npm run test:iterative</pre><p>This will execute your tests in a loop, which can be particularly useful for identifying flaky tests or ensuring consistency across multiple runs.</p><p>package.json file that includes iterative test execution using Playwright. This setup is used @playwright/test along with a script to run tests in a loop or with different configurations.</p><pre>{<br>  &quot;name&quot;: &quot;playwright-project&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;description&quot;: &quot;A Playwright project for QA Karanfil Duygu&quot;,<br>  &quot;main&quot;: &quot;index.js&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;test&quot;: &quot;npx playwright test&quot;,<br>    &quot;test:iterative&quot;: &quot;for i in {1..5}; do echo \&quot;Iteration $i\&quot;; npx playwright test; done&quot;<br>  },<br>  &quot;author&quot;: &quot;QA Karanfil Duygu&quot;,<br>  &quot;license&quot;: &quot;MIT&quot;,<br>  &quot;devDependencies&quot;: {<br>    &quot;@playwright/test&quot;: &quot;^1.0.0&quot;<br>  }<br></pre><p>Playwright is a robust and flexible tool that enables you to test your web applications under various scenarios. In this guide, you’ve learned how to set up Playwright from scratch and explored what you can achieve with it. By integrating Playwright into your projects, you can automate and enhance your testing processes effectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de1ad468e679" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performans Testi Türleri,  En İyi Toollar, Uygulamalar ve Neden Önemlidir ?]]></title>
            <link>https://medium.com/@kduygu.ozdemir/performans-testi-t%C3%BCrleri-en-i%CC%87yi-toollar-uygulamalar-ve-neden-%C3%B6nemlidir-62c8df76535e?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/62c8df76535e</guid>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Tue, 21 Feb 2023 18:02:31 GMT</pubDate>
            <atom:updated>2023-02-21T18:02:31.159Z</atom:updated>
            <content:encoded><![CDATA[<h3>Performans Testi Türleri, En İyi Toollar, Uygulamalar ve Neden Önemlidir ?</h3><h3>Performans Testi nedir?</h3><p>Performans testi, bir yazılımın hızını, ölçeklenebilirliğini ve kararlılığını engelleyen sorunları belirlemek için yürütülen bir dizi testtir. Bu, yazılım sisteminin tüm gerekli kullanıcılara zamanında ve güvenilir bir şekilde aynı anda hizmet verirken iş talebini karşılama kapasitesiyle oluşturulmasını sağlamanın ideal yoludur.</p><p><strong>Neden performans ölçmeliyiz ?</strong></p><ul><li>Yazılımın kullanılabilirliğini, verimliliğini ve bakım kolaylığını artırmak.</li><li>Sistemin kurulum, uygulama ve izleme şeklini optimize etmek.</li><li>Sistemin stres altındaki davranışı ve kullanılan teknolojiler için gerekli iyileştirme ve geliştirme yapmak.</li></ul><p><strong>Yük Testi</strong></p><p>Yük testi , sistemin hem normal hem de extrem yük koşullarına maruz kaldığındaki davranışlarını incelemek için kullanılan bir yazılım test tekniğidir.</p><p>Yük testleri, yük miktarının belirli oranlarda arttırılarak hangi seviyede sorun çıktığının araştırılması şekliyle uygulanır. Yani dayanabileceği maksimum yük miktarını bulmaya yardımcı olur. Her işlem için tepki süresi, sistem bileşenlerinin çeşitli yükler altında performansı, bellek tıkanıklığı, ağ tıkanıklığı gibi donanım sınırlama sorunlarının tespitinde ve performansı iyileştirmek için sistemin ince ayara ihtiyacı olup olmadığının ya da donanım ve yazılım değişikliğinin gerekip gerekmediğinin tespitinde görev alır.</p><p><strong>Stress Testi</strong></p><p>Stress testindeki asıl nokta yük altındaki sistemin, aşırı yükler altında nasıl davrandığını ve arızadan nasıl kurtulduğunu kontrol etmek için yapılan performans testinin bir alt kümesidir. Yük testi, eşzamanlı kullanıcı sayısında maksimum seviyeye ulaşması durumunda, kaynaklar aşırı yüklenene kadar sistemdeki yükü arttırmaya devam edecektir. Bu noktada, sistemin düzgün bir kurtarma gerçekleştirip gerçekleştiremeyeceğini görmek için sistemi kasıtlı olarak arıza durumuna itmektir. Böylece kırılma noktalarındaki risklerin analiz edilmesini ve ince ayar ile risklerin en aza indirgenmesini sağlar.</p><p><strong>Performans testi</strong></p><p>Sistemin belirli bir yük altındaki performansının ölçülmesi ve istenilen performansa ulaşmasının sağlanmasıdır. Sistemin ağır yük altındaki dar boğazlarının, kod ve veritabanı gibi sistemlerle çözülmesini amaçlamaktadır. Başarılı bir performans testi; veri tabanı, ağ, yazılım, donanım vb. ile ilgili olabilecek performans sorunlarını kapsamalıdır.</p><h3><strong>En iyi open-source performans testi araçları</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*M95FBoyv2_8PaQe6NIKxgA.png" /></figure><ul><li>Jmeter</li></ul><p>Jmeter java tabanlı olan uygulamalarımıza performans testi yapmamızı sağlayan açık kaynaklı uygulamadır. Jmeter ile web uygulamalarımızı son kullanıcıya sunmadan önce test ederek performans çıktılarını görebiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/0*GUdvG4dNEwy6tMe2.jpeg" /></figure><p>- Gatling</p><p>Yük testinde uzmanlaşmış açık kaynaklı bir araçtır ve bu da onu daha büyük kurumsal uygulamalar için güvenilir bir araç haline getirir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*msGYaEryWqgkFLbgYXRh5g.png" /></figure><p>-Locust</p><p><strong>Locust,</strong> açık kaynak kodlu python ile yazılmış bir yük testi uygulamasıdır. Kullanıcıların ortamlarını aynı anda simüle etme gücüne sahip, öncelikle web siteleri için tasarlanmış, ölçeklenebilir, açık kaynaklı bir yük testi aracıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/1*TpLYYFgkjBYheZbJC5tgZA.png" /></figure><p>-LoadRunner</p><p>Yazılım, uygulama bileşenleri ve son kullanıcı eylemleri arasında tuş tıklamaları veya fare hareketlerine benzer şekilde mesajlar üretir. LoadRunner ayrıca bulut kullanımına yönelik sürümler de içerir.</p><h3><strong>Performans ve Yük Testi Sırasında Hangi Dokümanlar Üretilir?</strong></h3><p>• Sistemin dar boğazları (concurrency)<br>• Sistemin response-request zamanları<br>• Sistem için ideal yük<br>• Sistemin kaldıracağı maximum yük<br>• Sistemi yayınlayacak server için ideal donanım yapısı</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62c8df76535e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bug - Debugging (Hata ayıklama) Nedir?]]></title>
            <link>https://medium.com/@kduygu.ozdemir/bug-debugging-hata-ay%C4%B1klama-nedir-fe24e8a9f1d3?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe24e8a9f1d3</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[debug]]></category>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Sun, 16 Oct 2022 19:26:37 GMT</pubDate>
            <atom:updated>2022-10-16T19:26:37.851Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*msUTd4ME4So93Wgd9tcdIw.png" /></figure><p><strong>Bug,</strong> kısaca kodlama hatası olarak tanımlanabilir. Ürün son kullanıcıya açılmadan önce geliştirme ortamında bulunan bir hata, programın yetersiz çalışmasına, yanlış sonuçlar vermesine veya çökmesine neden olabilir.</p><p>Bug’lar aşağıdaki türlerde olabilir.<br>-Mantık(Logic) hataları<br>-Algoritmik hatalar<br>-Kaynak(Resource) hataları</p><p>Uygulamanın gereksinime göre çalışmaması <strong>defect (</strong>kusur) olarak adlandırılır. Defectler Severity ve Prioritylerine göre sınıflandırılırlar. <a href="https://medium.com/@kduygu.ozdemir/software-quality-process-23ea1b3ff43f">Detaylar için ilgili yazımı inceleyebilirsiniz.</a></p><p>Koddaki sorun hatalara yol açar. Geliştiricinin gereksinimi yanlış anlaması veya gereksinimin doğru tanımlanmaması nedeniyle kodlama hatası kaynaklı meydana yaşanan sorunlar <strong>error </strong>(hata) olarak adlandırılır.</p><p>Errorlar aşağıdaki türlerde olabilir.<br>-Sözdizimsel Hata<br>-Kullanıcı arayüzü hatası<br>-Akış kontrol hatası<br>-Hata işleme hatası<br>-Hesaplama hatası<br>-Donanım hatası<br>-Test Hatası</p><p><strong>Defect </strong>(kusur), yazılımın arızalanmasına(<strong>failure</strong>) yol açar. Bu ürün veya modülün, yanıt vermemesine veya bozulmasına neden olan önemli bir soruna yol açabilir. Yukarıdaki tüm terminolojiler, yazılımın farklı bölümlerini etkiler.</p><h3>Debugging (Hata Ayıklama) Nedir?</h3><p>Debugging yani <strong>hata ayıklama</strong>, bir yazılım kodunun beklenmedik şekilde davranmasına veya çökmesine neden olabilecek mevcut ve olası bug’ları algılama ve düzenleme işlemidir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*575hAN-cieDyxQaltWlTVQ.png" /></figure><p>Hata Ayıklama ile ilgili adımlar<br>Hata ayıklama sürecinde yer alan farklı adımlar şunlardır:</p><p>1. <strong>Hatayı Tanımlayın</strong>: Hatanın net bir şekilde tanımlanmaması, geliştirme sürecinde zaman kaybına neden olur. Test ekibi tarafından bildirilen hatalarının yoruma açık olması ve bazen toplana bilgilerin yanıltıcı olması olağandır. Hatanın net ve temiz ifade edilmesi ve tanımlanması gerekir.</p><p>2. <strong>Hata Kaynağını Bulun</strong>: Hatanın doğru bir şekilde belirlenmesi sonrası, hatanın tam olarak nerede olduğunu bulmak için kodu incelemeniz gerekir. Bu aşamada, hatayı anlamak yerine bulmaya odaklanmanız gerekir.</p><p>3. <strong>Hatayı Analiz Edin</strong>: Bir hatayı analiz etmenin amacı; bulunabilecek diğer hataları incelemek ve düzeneleme esnasında herhangi bir ikincil hata oluşumu riskini ortadan kaldırmaktır.</p><p>4. <strong>Analizi Kanıtlayın</strong>: Hatanın analizi tamamlandıktan sonra, uygulamada görünebilecek olası birkaç hata senaryosu denenerek, bu alanlarda problem olmadığı kanıtlanmalıdır.</p><p>5. <strong>Hatayı Kapsayın:</strong> Bu aşamada, değişiklik yapılacak kısmın tanımlanan hatayı kapsadığından emin olmak için test etmek gerekmektedir.</p><h4>Sorunun kaynağını bulma</h4><p>Pycharm üzerinde bulunan <strong><em>Debug </em>🕷 </strong>penceresinde frameler, değerler ve düm input outputların yansıtıldığı konsol görüntülenir.</p><figure><img alt="Debug penceresinin sağ üst köşesindeki Düzen seçenekleri düğmesini ve ardından Varsayılan ayar için Restore Default Layout tıklayın." src="https://cdn-images-1.medium.com/max/1024/1*Le4BBRj40G3O8N_zXjuo9Q.png" /><figcaption>Debug penceresinin sağ üst köşesindeki Düzen seçenekleri düğmesini ve ardından Restore Default Layout’ı tıklayın.</figcaption></figure><p><strong>Stepping</strong></p><p>Kodunuzun satır satır ne yaptığını görmek istiyorsanız, incelemek istediğiniz satıra bir <strong>breakoint </strong>koymanıza gerekmektedir. Hangi satırda durmak istediğimizi seçmek için adımlama araç çubuğu düğmelerini kullanabiliriz.<strong> Ctrl+Shift+F8 </strong>ile Breakpoint noktalarını konfigüre edebilrsiniz.</p><p>Debug penceresinin araç çubuğunda Breakpoint mute düğmesine basıldığında, bir projedeki tüm breakpointler mute’a alınır ve simgeleri gri olur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*WGPmGa85-WCpH_3A6fm_fg.png" /></figure><p>Programı, seçilen breakpointlerde durmadan yürütmek için bir projedeki tüm kesme noktalarını geçici olarak sessize alabilirsiniz.</p><p>Kod breakpoint konulan satıra kadar çalışır ve sonrasında <strong>Step Over</strong> buttonu, mavi işaretçinin bir sonraki step’e manual olarak geçirmek için kullanılır. (F8)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*8LRHI6ImT4SHr_h4Pzu9Iw.png" /></figure><p>Hata ayıklayıcının seçili step’e geldiğinde çağrılan methoda ve içerisine girmesini sağlamak için <strong>Step Into</strong>’ya tıklayın. (F7)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*I6WHKpJ0-7n08cEGYU6VYw.png" /></figure><p><strong>Step Out</strong> , çalıştırılan kodların içindeki tüm komutları işletir ve eğer method içinde başka bir method çağırılıyorsa o metodu da işletir ve bir sonraki satırdan çalıştırmaya devam eder.</p><p><strong>Run to Cursor</strong> : İmlecin bulunduğu satırdan itibaren programın çalışmasını sağlar.</p><p>PyCharm, ek detayları incelemek veya execution esnasnda farklı senaryoları test etmek için bir session açarak eş zamanlı değerlendirmenize olanak tanır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*VzvPlAoMpVlv7_ZbI6ve5Q.png" /></figure><p>Execution esnasında çalıştırmak istenen kısım seçilerek, <strong>Evaluate Expression</strong>’a tıklanır. İfade sonucu, açılan ekranda görüntülenir.</p><p>İfadenin sonucu, return ifadesinden alınır. return ifadesi olmadığında, sonuç kodun son satırından alınır (ifade olması bile gerekmez: bir hazır bilgi de işe yarar). Değer alınacak geçerli bir satır olmadığında sonuç tanımsızdır. Belirtilen ifade değerlendirilemezse, Sonuç alanında nedeni belirtilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*nyQMAYZOynZaRYMuzluosg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe24e8a9f1d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git 101]]></title>
            <link>https://medium.com/@kduygu.ozdemir/git-101-f3802479de1a?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3802479de1a</guid>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Thu, 04 Aug 2022 19:50:52 GMT</pubDate>
            <atom:updated>2022-08-04T19:55:15.785Z</atom:updated>
            <content:encoded><![CDATA[<p>Git yani Versiyon kontrol sistemi (Version Control System), proje üzerinde yapılan değişiklikleri step-by-step kaydederek, internet üzerinde bir repositoryde saklamamızı sağlayan bir sistemdir.</p><p><strong>Github </strong>versiyon kontrol sistemleri için (git) uzak bir depo(repository)dur. Gİthub üzerinden projeleri localinize çekebilir, yapılacak değişiklikleri tamamlayıp tekrar GitHub’a atabilirsiniz. Projeleri vereceğiniz yetkiler dahilinde ilgili kişilerin görebileceği gibi <strong>private </strong>olarak ya da herkesin görebileceği gibi <strong>public </strong>olarak paylaşabilirsiniz.</p><p><strong>GitLab</strong>, <strong>GitHub</strong>’ın kullanıcılara sağladığı işlevlerin tamamını sunan bir <strong>Git</strong> servisidir. GitLab’ı, GitHub’tan ayıran özelliği sınırsız kod deposu ve disk alanı sağlamasıdır.</p><p><strong>Bitbucket</strong>, Python’da Django frameworkü ile geliştirilmiş, Git veya Mercurial gibi versiyon kontrol sistemi kullanılan projeler için bir git servisidir. <strong>Mercurial</strong>, yazılım geliştiricileri için platformdan bağımsız bir şekilde kullanılan bir sürüm(version) denetim aracıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*LIkmYj4HqQPOOk_dpJQBqA.png" /></figure><p><strong>Commit Nedir?</strong></p><p>GIT’in bir versiyon kontrol aracı olduğundan ve ste-by-step tüm yapılan değişikliklerin tuulduğundan bahsetmiştik. Commit ise, Git’e eklediğimiz dosyaları Git veri tabanına işlemeye denir. Projede yapılan değişklikler sonrası bu değişiklikleri işlemek gerekir. Bir proje üzerinde çalışan birden fazla kişi var ise, aynı dosya üzerinde yapılan değişikliklerin çakışmadan kontrol edilebilmesi sağlar. Her çalışanın projelerin güncel versiyonlarına ulaşabilmesine yardımcı olur. Atılan commitlerin sonradan bakıldığında anlaşılır olması ve proje üzerinde çalışan herkesin yapılan değişikliği kısa sürede anlayabilmesi için commitlere yapılan değişikliği özetler nitelikte mesaj eklenmelidir.</p><figure><img alt="commit" src="https://cdn-images-1.medium.com/max/185/1*_PH1n4gtunTdzUXF7WkNrg.png" /></figure><h4>Branch Nedir?</h4><p>Branch, kullanıcıya çalıştığı projenin farklı versiyonlarına erişmesini sağlar. Projeye bir yenilik eklenilmek istediğinde, yapılan değişiklik projenin çalışmasını olumsuz etkileyebilir. Bu nedenle projenin o anki halini bozmamak için branch yapısı kullanılır.</p><p>Git’de proje oluşturulduğunda default olarak <strong>master</strong> adında bir branch oluşur. Yeni bir güncelleme yapılacağı zaman master branch’i üzerinde yeni bir branch açılmalıdır.</p><h4>Merge Nedir?</h4><p>Branch üzerinde yaptığımız değişiklikleri tamamlayıp Staging ve Commit işlemlerimizi yaptıktan sonra, tüm bu değişiklikleri projenin <strong>master</strong> branch ile denk olması gerekmektedir. Merging en basit anlamda herhangi bir brach’de yaptığımız değişiklikleri <strong>master</strong> branch’imiz ile birleştirme veya <strong>master</strong> branch’e entegre etme işlemidir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*VymQeG5eJfGPOoCXoTFVhw.png" /></figure><h3>— — — — Kurulum — — — —</h3><p>Öncelikle<a href="https://git-scm.com/downloads"> <strong>https://git-scm.com/downloads</strong></a> linki üzerinden kullanılan işletim sistemimize uygun bir versiyon indirerek başlayabiliriz.</p><h3>Başlıca Git Komutları</h3><p>Kurulum sonrası kontrol etmek ve versiyon öğrenmek için aşağıdaki komut kullanılır.</p><pre>git — version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*eneEQFExlwn8eXe0dD_74Q.png" /></figure><pre>Git init</pre><p>komutu ile localimizdeki bir projeyi versiyonlamak istediğimizde, proje klasörü içerisinde <strong><em>.git</em></strong> klasörü oluşturacağımız zaman kullanılır.</p><pre>git clone {project&#39;s url} </pre><p>Clone ile localimizde bu projenin bir kopyası oluşturup, proje üzerinde yapmış olduğumuz değişiklikler uzak sunucudaki repository’i etkilemeden değişiklik yapabiliriz.</p><p>Projeye yeni bir eklenti yapmak için aşağıdaki komut kullanılır.</p><pre>git add {new_feature}.py</pre><p>Gönderilen bir commit’e mesaj eklemek için de;</p><pre>git commit -m “messages about changing”</pre><p>kullanılmalıdır.</p><h4><strong>Commitleri Geri Almak</strong></h4><pre>git reset<br>git checkout<br>git revert </pre><p>yapılan değişikliklerin etkilerini geri almak için kullanılır.</p><p>git reset ve git checkout hem commit hem de tek tek dosyalarda kullanılabilir. git revert sadece commit düzeyinde kullanılır.</p><p>Vakit ayırdığınız için teşekkürler !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3802479de1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Quality Process]]></title>
            <link>https://medium.com/@kduygu.ozdemir/software-quality-process-23ea1b3ff43f?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/23ea1b3ff43f</guid>
            <category><![CDATA[test-case-management]]></category>
            <category><![CDATA[requirement-analysis]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[software-testing]]></category>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Sat, 05 Feb 2022 09:12:38 GMT</pubDate>
            <atom:updated>2022-02-05T09:12:38.158Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hr2FrHzyBeQWXXAp1o364A.png" /></figure><p>Software testing is research conducted to provide information to stakeholders about the quality of services or products under testing, software testing is also the independent and objective examination of software to understand the risks of software applications. This writingrelated to details for the management of this process.</p><h3>Requirement Analysis</h3><p>Requirements analysis is the first stage of the software life cycle. It involves constant communication with all project teams and end-users of the product to define expectations, resolve conflicts, and document all the key specifications. Requirements analysis; critical to the success or failure of a system or software project. Requirements must be documented, practicable, measurable, in testable form, traceable, and appropriate to the needs of the identified business.</p><h3>Categorization of Requirement</h3><p>The analysis is essential for project planning, system verification and validation, and integration coordination. Categorizing requirements can help developers and test teams.</p><h3>- Functional Requirements</h3><p>The functional requirements describe what to do in the process of determining the necessary task, action, or task that must be performed.</p><h3>- Non-functional Requirements</h3><p>Non-functional requirements can be described as system constraints or expected states. For example, issues such as how many users the software will support and which version of the software will support are non-functional requirements. They must be classified separately from the functional requirements for testing.</p><h3>- Performance Requirements</h3><p>How a task or authority will be carried out; regardless of usage, quality, scope, timing, or readiness. Performance (how well should it be completed) in requirements analysis will be developed interactively between basically all functions in terms of preparation, system lifespan; For precision in their estimates, criticality for the application, and things to do with those related to uses.</p><h3>-Design Requirements</h3><p>It includes requirements for “build”, “code/test requirements” and “how to execute” questions for products, for processes expressed in technical data packages and technical manuals.</p><h3>Designing test cases</h3><h3>About Test Case</h3><p>Test cases are the documents that specify the inputs, events, or actions prepared according to the requirements and the results expected to occur as a result of these. The variety of input sets results in an infinite number of test cases. It is not possible to consider all of them individually due to time and cost constraints. Testers or QA Engineers have to develop strategies to create the most test coverage with the minimalized scenarios. All lines of code must be run at least once and a test case set should be covered all inputs must be used to complete the test process.</p><h3>Required Fields</h3><p>A basic test case body consists of expected and actual outputs versus inputs. The script must have a purpose. It should create a traceability matrix over the objectives to keep track of no open issues and which scenarios should be run.</p><p><strong>Suite:</strong> Related test cases should be in the same group.</p><p><strong>Test Case No:</strong> ID of the test case.</p><p><strong>Use Case No:</strong> Which use case the test case is associated with.</p><p><strong>Test Purpose or Title:</strong> A title about why the test case was written.</p><p><strong>Preconditions:</strong> Infrastructure, prerequisites required to perform the test.</p><p><strong>Priority:</strong> The importance of the test case for the system. There is no specific standard of priority.</p><p><strong>Test Step No:</strong> Test step number.</p><p><strong>Test Data:</strong> The data to be used when performing the test.</p><p><strong>Expected Outputs:</strong> Expected outputs as a result of inputs (operation performed).</p><p><strong>Actual Outputs:</strong> Outputs encountered while testing.</p><h3>Execution and Evaluation of Test Cases</h3><p>Test suites and individual test cases are executed. This can be done manually or using test execution tools (automation) according to a scheduled sequence. After creating test cases, testers take test conditions, convert them into test cases and test products during execution, and set up the test environment.</p><p>The process of executing tests can be facilitated by a variety of tools. The evaluation process is a comparison process and is the mutual evaluation of the software test results and the outputs specified.</p><p>The result of the test execution should be recorded. (Test Execution Log). The identities and versions of the tested software, test tools, and test software are logged.</p><p>The actual results (what happened after running the tests) are compared with the expected results (which we predict).</p><p>In case of discrepancies between actual and expected results, Bugs should be reported.</p><p>The test of the correction performed for each failure is repeated. For example, re-run a previously failed test (validation test) to validate the fix, run a corrected test, and/or tests (regression) to ensure that errors do not occur in unmodified areas of the software or that the bug fix does not reveal other failures.</p><h3>Bug Management</h3><p>In the bug management and reporting phase, the priority level is selected for the errors and the error description is entered in detail. In the bug description, the data and environment information used in the test scenario should be entered. The test scenario is entered step by step. The expected state and the actual state are indicated. Supported by screenshot and video if possible. Bug recording is created by assigning the person to correct the failure.</p><h4>Bug Title</h4><p>The error header is used to distinguish the found error from other errors. However, it is an important part. The error title should be short and understandable. The person to fix the bug or another QA engineer should have a full understanding of the topic when they read the title.</p><p>The main reason for specifying the URL address where the error occurred in the error report is so that the person who will correct the error can quickly simulate the error or view the error. However, URL information cannot be given in the error report for dynamic URLs or one-time working URLs.</p><h4>Steps</h4><p>This is the section where the steps to catch the error are written. There should be a steps section in the bug report so that the developers can simulate the error quickly by repeating the same process.</p><p>Sample :</p><p>Step 1: Navigate to the homepage.</p><p>Step 2: Click on the ‘Form’ menu.</p><p>Step 3: Clicking the view option.</p><h4>Expected Result — Actual Result</h4><p>While testing any feature of the system, it is required to write the expected result and the actual result from the tested module. Because in this way, the person who will fix the error will understand what is wrong and will try to fix the problem quickly.</p><p>Sample :</p><p>• Step 1: The homepage opens.</p><p>• Step 2: Click the “Forms” button.</p><p>• Step 3: Check the opened form list</p><p>[Expected Result: Form list should be opened with all options.]</p><p>[Actual Result: Options are listed.]</p><h4>Priority and Severity</h4><p>Each error must have a priority. Critical errors that stop the system need to be fixed first. The priority classification can be as follows.</p><p>• Critical: Problems that stop the system. It must be resolved immediately.</p><p>• High: These are the errors that do not stop the system but affect it significantly.</p><p>• Medium: Errors that do not affect the operation of the system but show the quality of the project.</p><p>• Low: These are the problems that do not affect the operation of the system.</p><p>The severity of a software bug determines the extent of the impact of the bug on the operation of the system. The severity classification may be as follows.</p><p>• Critical: A newly made feature or a bug fixed caused a change in the infrastructure of the system.</p><p>• High: It is not a severity level that stops the system, but it is at a level that will affect its operation.</p><p>• Medium (Medium): It is the level of importance that does not disturb the operation of the system.</p><p>• Low: It is a small degree of aesthetic importance that does not affect the system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23ea1b3ff43f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automation Testing vs. Manual Testing]]></title>
            <link>https://medium.com/@kduygu.ozdemir/automation-testing-vs-manual-testing-c25f5eeff1be?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/c25f5eeff1be</guid>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[manual-testing]]></category>
            <category><![CDATA[software-testing]]></category>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Thu, 16 Dec 2021 19:04:41 GMT</pubDate>
            <atom:updated>2021-12-16T19:04:41.962Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi !!</p><p>In this writing, I will compare automation and manual testing, which are strong when they are combined their powers. The most successful test must have two factors: <em>repetition </em>and <em>variation</em>. These two factors give the highest chance of achievement.</p><h4>What is Automation Testing?</h4><p>Automation testing is a software testing technique to test and compare the actual result with the expected result. This can be accomplished by writing some test scripts or using any testing tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*GpzASVHt8FzKnT8E2uf37w.png" /></figure><h4>And, What Does Manual Testing Mean?</h4><p>Manual testing is the process of manually reviewing and testing software. It can be performed without any automated tools or scripts, to identify any error within the software from the client-end user’s perspective.</p><p><strong><em>Why do we need manual testing?</em></strong></p><p>In the evolving and growing software realm, software professionals are opting for automated testing, but there are still many reasons that support the need for manual testing. I can summarize in three main titles that automation can never replace.</p><ul><li>Human perspective</li><li>Exploratory testing</li><li>Custom &amp; UI Feedbacks</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*KNe_VOgLtDa59y1oBu_IBA.png" /></figure><p><strong>On the other hand. <em>Why do we need automation testing?</em></strong></p><p>Automation testing allows testers to write more coverage test scenarios that test complex cases. Test automation can help decrease the feedback process and bring faster verification for phases of the development. Test automation can easily run hundreds of different test cases in parallel. These scenarios are reusable as long as their content is not updated. The biggest advantage of automation testing over manual testing is that automated test allows you to do more testing in less time.</p><ul><li>Play for time</li><li>Higher test coverage</li><li>Stability of test flows</li></ul><p><strong>Scenarios We Can Consider Automation Testing;</strong></p><p>We can evaluate stable parts of the application for automation.<br>Areas where we need to test frequently. For example, if you need to test some fields after every build.</p><p>For automation, test scenarios with the possibility of man-made error should be considered.</p><p>Test cases that need to be tested with a different dataset or a large amount of data should be automated.</p><p>If there is any functionality with a high-risk condition, it needs to be automated.</p><p>Test cases that cannot be performed manually, For example, Multilingual sites.</p><p>For automation, test scenarios that need to be tested in different browsers and different environments should be considered.</p><p><em>I appreciate your time.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c25f5eeff1be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rest Assured ile API Testi]]></title>
            <link>https://medium.com/@kduygu.ozdemir/rest-assured-ile-api-testi-a3c7dd355382?source=rss-903cca54663------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3c7dd355382</guid>
            <category><![CDATA[api-testing]]></category>
            <category><![CDATA[rest-a]]></category>
            <category><![CDATA[mock-api]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Karanfil Duygu Ozdemir]]></dc:creator>
            <pubDate>Sun, 05 Dec 2021 20:57:13 GMT</pubDate>
            <atom:updated>2021-12-05T21:24:10.109Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*nE4rIJ4GZsTbmSaoqHH2gg.png" /></figure><p>Merhabaaa !</p><p>Restful web servislerini test etmek için kullanılan bir java kütüphanesi Rest Assured ile Api testi yapıyoruz. Api olarak geçen yazımda, nasıl oluşturduğumdan bahsettiğim mock apiyi kullanacağım. <a href="https://medium.com/@kduygu.ozdemir/json-server-ile-mock-api-olu%C5%9Fturma-ve-postman-kullan%C4%B1m%C4%B1-f32893d267f3"><strong>Buradan </strong></a>detaylara ulaşabilirsiniz. Keyifli okumalar :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/1*KkSiTWaOC_cSOfSRWwAZQg.png" /></figure><h4>Rest Assured Nedir?</h4><p>XML ve JSON tabanlı web servislerini test etmek için kullanılan CRUD(Create,Read,Update,Delete) requestlerini destekleyen ve bu requestlerin statulerini, headerları ,body response’u vb. doğrulamak için kullanılabilir. Ayrıca JUnit, TestNG gibi test frameworkleri ile entegre edilebilir.</p><p>HTTP methodları GET, PUT, POST, PATCH ve DELETEden bahsedelim;</p><p><strong>GET</strong> metodu sunucudaki kaynaklara erişmek için kullanılır.<br><strong>PUT</strong> metodu kullanarak servis sağlayıcı üzerindeki IDsi belirtilen kaynağı güncelleyebilir veya yeni bir kaynak oluşturabilirsiniz.<br><strong>POST </strong>sunucuya veri göndermek için kullanılır. Fakat bu metotta göndereceğiniz parametreler yalnızca mesaj gövdesinde (body) gönderilebilmektedir.<br><strong>DELETE </strong>ile sunucu üzerindeki herhangi bir veri silinebilir. Bu sebeple, Delete Metod’nun kullanılabilir olması güvenlik açısından problem oluşturabilir.</p><p>HTTP yanıtı durum kodları, belirli bir <strong>HTTP </strong>isteğinin başarıyla tamamlanıp tamamlanmadığını gösterir. Yanıtları beş sınıfta gruplandırabiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*DvasUMt3Er5BQNvYuIt1BQ.png" /></figure><p>Tüm statü kodlarına dair detaylı bilgiye <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status"><strong>buradan </strong></a>ulaşabilirsiniz.</p><h3>REST Assured konfigürasyonları</h3><p>Öncelikle bir maven projesi oluşturarak başlıyoruz. pom.xml’de gerekli dependencies eklemelerini yapıyoruz.</p><p>Bir java class oluşturarak HTTP methodlarımızı test edeceğimiz senaryoları oluşturalım ve oluşturduğumuz Mock Apiye “Occupation” alanı “Dentist” olan dataları çağırması için bir GET requesti gönderelim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*eBMv2igtcUjxi9yppyWaQA.png" /></figure><p><em>.time</em> ile milisaniye bazında değer vererek , beklenilen sürenin üstünde yanıt dönen çağrıları da kontrol edebiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*2sICo860pUaPZpkrSqG4lw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*D0OBmXuhyBHU9T9a5Yea6Q.png" /></figure><p>Yeni bir kayıt oluşturabilmek için POST methodu gönderelim. Bu noktada status code için 201 Created vermeliyiz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*O1LtdhRXYdBwG71DEefjaA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*Y44-EYqMJ4Dqn6KGDrusow.png" /></figure><p>Belirlenen bir kaydı güncelleye bilmek için PUT methodu gönderelim. Burada Occupatiion alanınındaki Agent değerini “is not Agent ” olarak güncelleyelim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*BPXjMqkSrvNgMgepDVQZPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*kC_39oeYlKIN_pKEaRaUTg.png" /></figure><blockquote><em>Projenin repositorisi için github profilimi ziyaret edebilirsiniz :)</em></blockquote><blockquote><a href="https://github.com/duyguozdemir/Rest-Assured-with-MockApi">https://github.com/duyguozdemir/Rest-Assured-with-MockApi</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3c7dd355382" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>