<?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 Tadas Stankevicius on Medium]]></title>
        <description><![CDATA[Stories by Tadas Stankevicius on Medium]]></description>
        <link>https://medium.com/@tadasgym95?source=rss-530d4421177a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*CTfuGpqqgIaFkiL-e3F7mg.jpeg</url>
            <title>Stories by Tadas Stankevicius on Medium</title>
            <link>https://medium.com/@tadasgym95?source=rss-530d4421177a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 21:59:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tadasgym95/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Find the Right MCP Server for Any Task Without Spending an Hour on GitHub]]></title>
            <link>https://medium.com/@tadasgym95/how-to-find-the-right-mcp-server-for-any-task-without-spending-an-hour-on-github-3c4aafb5e195?source=rss-530d4421177a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c4aafb5e195</guid>
            <category><![CDATA[search]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Tadas Stankevicius]]></dc:creator>
            <pubDate>Mon, 23 Mar 2026 22:24:28 GMT</pubDate>
            <atom:updated>2026-03-23T22:24:28.466Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1SKBknIyTV4QV0alaYDIxg.png" /><figcaption>a2asearch.ai</figcaption></figure><p>If you have been using Claude or Cursor lately, you have probably heard about MCP servers. These are connectors that give your AI access to real tools. They can search the web, query databases, run code, and control browsers.</p><p>They are powerful.</p><p>The problem is discovery.</p><p>There is no App Store for MCP servers. GitHub search is noisy. Many awesome lists are outdated.</p><p>I ran into this problem enough times that I built a solution.</p><h3>What We Are Working With</h3><p><a href="https://a2asearch.ai/">A2ASearch</a> is a directory that indexes over 5,000 MCP servers, AI coding agents, CLI tools, and agent skills.</p><p>Everything is sourced directly from GitHub and structured for easy browsing:</p><ul><li>Real descriptions</li><li>Real star counts</li><li>Full READMEs</li><li>Updated daily</li></ul><p>There are two ways to use it:</p><ol><li>CLI tool in your terminal</li><li>MCP server inside Claude or Cursor</li></ol><h3>Option 1: CLI Search from Your Terminal</h3><p>No installation required.</p><h3>Search by type</h3><p>Only Testing servers:</p><pre>npx -p a2asearch-mcp a2asearch testing</pre><pre>~ % npx -p a2asearch-mcp a2asearch testing<br>Showing 10 of 79 results<br><br>1. Mcp Pyautogui Server MCP Server ⭐ 11<br>   The mcp-pyautogui-server is a Model Context Protocol (MCP) server that provides automated…<br>   https://github.com/hetaobackend/mcp-pyautogui-server<br><br>2. Aptos Mcp Server MCP Server <br>   The Aptos MCP Server is an AI agent that interacts with Aptos documentation and enables c…<br>   https://github.com/tlazypanda/aptos-mcp-server<br><br>3. Mcp MCP Server <br>   This AI agent is a Python implementation of the Model Context Protocol (MCP) that enables…<br>   https://github.com/ujjalcal/mcp<br><br>4. Awsome_Kali_Mcpservers MCP Server ⭐ 2<br>   MCP-compatible agent<br>   https://github.com/vermaxvr/awsome_kali_mcpservers<br><br>5. Mcp Testing Interface For Llms MCP Server <br>   The Memory Context Provider (MCP) Server is an AI agent that manages context for LLM inte…<br>   https://github.com/srish-ty/mcp-testing-interface-for-llms<br><br>6. Coder Toolbox Mcp Server MCP Server ⭐ 2<br>   The Coder Toolbox MCP Server is a utility </pre><p>Top CLI tools:</p><pre>npx -p a2asearch-mcp a2asearch --top </pre><p>The --top flag sorts by GitHub stars, so you see the most widely used tools first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A0naEsMbd_y1NSqmqo_Vsw.png" /></figure><h3>Get full details for a specific tool</h3><pre>npx -p a2asearch-mcp a2asearch --get ollama</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0p75uv-vgJZ_MUPCqIgJpA.png" /></figure><p>This returns:</p><ul><li>Full README</li><li>Capabilities</li><li>Languages</li><li>Star count</li><li>Last commit date</li></ul><h3>Option 2: Search Directly Inside Claude</h3><p>Claude Code Install:</p><pre>claude mcp add a2asearch --npx -y a2asearch-mcp</pre><p>Usage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aYoc_jyMDjyZGYCMeMbC6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbfjcap3KCdP-5xktWlElg.png" /></figure><p>Claude Desktop Install:</p><p>Add this to your Claude Desktop config:</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;a2asearch&quot;: {<br>      &quot;command&quot;: &quot;npx&quot;,<br>      &quot;args&quot;: [&quot;-y&quot;, &quot;a2asearch-mcp&quot;]<br>    }<br>  }<br>}</pre><p>Config file locations:</p><ul><li>Mac: ~/Library/Application Support/Claude/claude_desktop_config.json</li><li>Windows: %APPDATA%\Claude\claude_desktop_config.json</li></ul><p>Restart Claude after saving.</p><p>Now you can just ask:</p><blockquote><em>Find me MCP servers for browser automation<br> What are the most popular AI coding agents<br> I need an MCP server that can query PostgreSQL</em></blockquote><p>Claude will return real tools with real GitHub links. No hallucinated names.</p><p>For Cursor users, add the same config to:</p><pre>.cursor/mcp.json</pre><h3>Types of Tools Available</h3><p>The directory is split into five categories:</p><p><strong>MCP Servers (3,640)</strong><br> Connectors used in Claude and Cursor</p><p><strong>CLI Tools (629)</strong><br> Terminal tools like Ollama, yt-dlp, Playwright</p><p><strong>AI Coding Agents (217)</strong><br> Claude Code, Codex, Aider, Cursor</p><p><strong>Agent Skills (344)</strong><br> Libraries that extend agent capabilities such as Mem0, Browser Use, E2B</p><p><strong>A2A Agents (30)</strong><br> Implementations of the Agent to Agent protocol</p><p>Most searches will return MCP servers, but the other categories are useful for discovering tools you did not know existed.</p><h3>Using the API</h3><p>There is also a free REST API. No authentication required.</p><p>Top AI coding agents:</p><pre>curl &quot;https://a2asearch.ai/api/v1/agents?type=AI+Coding+Agent&amp;sort=stars&quot;</pre><pre>Response Sample:<br>&quot;data&quot;:[<br>      {<br>         &quot;name&quot;:&quot;Tabby&quot;,<br>         &quot;description&quot;:&quot;Self-hosted AI coding assistant&quot;,<br>         &quot;type&quot;:&quot;AI Coding Agent&quot;,<br>         &quot;agentCardUrl&quot;:&quot;https://github.com/TabbyML/tabby&quot;,<br>         &quot;capabilities&quot;:[<br>            &quot;Code Generation&quot;,<br>            &quot;CLI&quot;,<br>            &quot;IDE Integration&quot;,<br>            &quot;GitHub Integration&quot;<br>         ],<br>         &quot;topics&quot;:[</pre><p>Docs: <a href="https://a2asearch.ai/api-docs">https://a2asearch.ai/api-docs</a></p><p>Rate limit is 60 requests per minute, which is sufficient for personal projects.</p><h3>Wrapping Up</h3><p>MCP becomes genuinely useful once you solve discovery.</p><p>The ecosystem is growing fast. New servers are appearing daily for tools like Notion, Stripe, and local file systems.</p><p>If you use this often:</p><ul><li>Bookmark <a href="https://a2asearch.ai/">https://a2asearch.ai</a></li><li>Or use the CLI</li></ul><p>It is open source and free.</p><p>If something is missing, you can submit it directly on the site.</p><p>The directory currently covers MCP Servers, CLI Tools, AI Coding Agents, Agent Skills, and A2A protocol implementations. Everything is pulled from GitHub and updated daily.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c4aafb5e195" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get Ahead of Bugs: How to Identify High-Risk Areas in Your QA Testing Strategy]]></title>
            <link>https://medium.com/@tadasgym95/get-ahead-of-bugs-how-to-identify-high-risk-areas-in-your-qa-testing-strategy-384aad4739fd?source=rss-530d4421177a------2</link>
            <guid isPermaLink="false">https://medium.com/p/384aad4739fd</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[bugs]]></category>
            <dc:creator><![CDATA[Tadas Stankevicius]]></dc:creator>
            <pubDate>Fri, 17 Feb 2023 16:59:22 GMT</pubDate>
            <atom:updated>2023-02-17T17:00:49.777Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BEehS5_rnp1GFIUybgdR2Q.png" /></figure><p>In this article, we’ll discuss how to utilize Jira to help QA engineers identify product risk areas. In agile environments, we typically use Jira for ticket management, and we can leverage this tool to be more proactive in planning requirements and test cases.</p><p>To achieve this, we can use several different methods, and the tools you choose will depend on your preference. For the purposes of this example, we’ll be using Google Sheets and Jira Cloud. It’s important to note that you’ll need at least a few months’ worth of data before this becomes truly useful and also using labels to tag features.</p><p>To get started, create a Google Sheet and import Jira Cloud data. This will allow us to start analyzing the data and identifying patterns that can help in identifying risk areas.</p><p>If you don’t have Jira cloud then go to ‘Extensions’ then add ons and get add-ons and search for jira cloud. Once it’s added, simply authenticate with your usual account or a service account, this extension is created by ‘Atlassian’ and used by over 2m+.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wmKBxTVOHqECBy08hfOzQ.png" /></figure><p>Next Import all of the bugs from jira for the relevant project, I like to use JQL but it’s up to you if you want to use the basic import type, simply change JQL to basic and select your project and fields from the drop down menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*Xrtd2U8zWeaAoaT6mhQrzQ.png" /></figure><p>Once you have all of the data imported, create a new tab sheet, that is where we will process the data. Now when it comes to processing the data I usually like to do 2 things.</p><ol><li>Understand how many bugs were created vs how many were fixed. The reason I like to visualize this is because I want to identify product risk areas and to analyze the number of bugs created versus how many were fixed. It’s important to visualize this data, as it can help us understand how the bugs are progressing and identify periods where the fix ratio is too low or new bug creation is too high. By having these conversations with the team, we can discuss possible solutions to address these issues.</li><li>Find the features where most of the bugs seem to be coming from. This is important because it can help you predict how you will plan working on new tasks that target this feature specifically. Knowing that this is a high-risk area will not only help you prepare, but it will also help the team to take extra care when working on this feature.</li></ol><p>Lets first create a table to visualize how many bugs were created vs how many were fixed.</p><p>Rename your first sheet to ‘Data’ as we will refer to it in our new sheet</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/204/1*VxkhnvZuVjnuR_IZh8Y9AA.png" /></figure><p>To track the data for the specific time period you are interested in, write down all the months/year periods you want to monitor. For example, from October 2021 to October 2022. In the next column, add a filter to retrieve the data from the first sheet.</p><p>To do this, click on the column next to the date (Check sheet 2 image) and add the filter. Take note of the column letters used in this step and ensure that they match with yours. For instance, B4 on my sheet is the first date (October 2021) and ‘Data!G2:G’ is the column of the Data sheet that contains the status of each ticket, such as “Done” or “In Progress”. Make sure you adjust the column letters according to your sheet if they do not match.</p><p>Filter code</p><pre>=COUNTA(IFERROR(filter(Data!A2:A,Data!I2:I&lt;=DATE(YEAR(B4),MONTH(B4),31), Data!I2:I&gt;=DATE(YEAR(B4),MONTH(B4),0), Data!G2:G&lt;&gt;&quot;Done&quot;, Data!G2:G&lt;&gt;&quot;DEFFERED&quot;)))</pre><p>After you have the data appearing for the bugs created, repeat the process for bugs fixed by changing the filter to the status used to determine when a ticket was completed.</p><p>Once you have updated each field, the chart should start showing the numbers. Then simply drag and apply the filter across all dates, and it should adjust automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzCuzzEvWIsJYyIhX2TlBQ.png" /><figcaption>Sheet 2</figcaption></figure><p>To make the data more presentable, I like to include a chart to visualize the number of bugs created versus the number of bugs fixed. It’s important to note that bugs can carry over into other months, so a higher number can be shown for bugs fixed versus created. As long as the number of bugs fixed is not lower than the number created, you’re already in a good state.</p><p>By analyzing the data, we can identify months with a low number of issues fixed and bring this to the team’s attention. This will prevent the trend of only working on new features and encourage bug fixing to maintain a high level of product quality. This only takes 10 minutes to set up and the value gained in the long term is really worth it and this does not require a lot of technical knowledge as you can create charts to visualize the progress and present it to your team.</p><p>Now let’s move on to identifying high risk features</p><p>We can use the same filters for this. We just need to adjust the column filter to also read the feature title. As noted before this assumes that you label your features in Jira by either using labels or identifiable ticket/epic names. In this case we have our features labeled e.g authentication, account… and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*5EAHqVdpBQHxSWwI5yvGDQ.png" /></figure><p>Simply update the filter to get all feature names and then combine it with bugs created and this will give you a table of features and the bugs that were created against them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BEehS5_rnp1GFIUybgdR2Q.png" /></figure><p>From this example, we can see that the account feature is producing more bugs. This is a red flag, and the next step would be to present it to the team to understand why. If a conclusion cannot be reached, I will take this into consideration when developing my test plans.</p><h3>Conclusion</h3><p>The ability to identify high-risk features within a project and act upon it is crucial for maintaining high product quality. By analyzing data and creating charts to visualize bug creation and fixing trends, QA can easily spot risk areas and bring them to the attention of the team. This allows for early mitigation of potential issues, resulting in a more proactive testing approach and a more stable product overall.</p><p>Nearly everyone is using Jira so I recommend that you try this with your team, it does not take long to set up but the value gained from these 2 data points is incredible and really helpful to QA as well as the rest of the team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=384aad4739fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chat GPT: A Game-Changing Tool for Quality Assurance Professionals]]></title>
            <link>https://medium.com/@tadasgym95/chat-gpt-a-game-changing-tool-for-quality-assurance-professionals-8977791e0280?source=rss-530d4421177a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8977791e0280</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Tadas Stankevicius]]></dc:creator>
            <pubDate>Sat, 17 Dec 2022 11:41:46 GMT</pubDate>
            <atom:updated>2022-12-17T11:41:46.074Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mM7QrUr6g8VhqxahUeFkgw.png" /><figcaption>Chat GPT: A Game-Changing Tool for Quality Assurance Professionals</figcaption></figure><p>Last week we saw a big rise in the use of ChatGPT and its capabilities and I wanted to investigate how GPT usage could improve QA processes and streamline some of the work we currently do and what we can expect in the future.</p><p>To understand the potential of GPT, let’s first take a look at what it is and the various QA roles it can potentially tackle.</p><h3><strong>What is GPT?</strong></h3><p>GPT-3 (short for “Generative Pretrained Transformer 3”) is a large language model developed by OpenAI. It is capable of generating human-like text, and can be used for a wide range of natural language processing tasks, such as translation, summarization, and text generation. GPT-3 is trained on a massive amount of text data, which allows it to generate text that is often difficult to distinguish from text written by a human. It is one of the most advanced language models currently available, and has been used in a variety of applications.</p><h3><strong>What are some of the QA Engineer roles?</strong></h3><p>A QA engineer is responsible for ensuring the overall quality of a product or service through the use of automation and manual testing. This typically involves developing and implementing automation testing strategies and plans, as well as executing tests using specialized tools and frameworks.</p><p>Some other potential roles and responsibilities of a QA engineer could include:</p><ul><li>Collaborating with other teams, such as development and customer support, to understand requirements and priorities, and to identify opportunities for automation.</li><li>Developing and maintaining automation testing frameworks and tools.</li><li>Conducting regular reviews of requirements, design documents, and other project artifacts to ensure that automation testing is being properly integrated into the overall quality assurance process.</li><li>Providing guidance and mentorship to other team members on best practices for automation testing.</li><li>Participating in the development of quality standards and processes, and ensuring that they are followed consistently in the context of automation testing.</li><li>Monitoring and analyzing metrics, such as test coverage and execution time, to assess the effectiveness and efficiency of the automation testing effort.</li></ul><p>How can GPT help streamline some of these tasks?</p><p>In this article I will only focus on 2 tasks, tests documentation and automation.</p><h3><strong>Generating Test Documentation</strong></h3><p>Writing tests from acceptance criteria is a crucial part of the quality assurance process. As a QA engineer, it is your job to ensure that the product being developed meets the requirements and expectations of the customer. One of the ways you can do this is by creating and executing tests based on the acceptance criteria provided by the product team or other stakeholders. These then get broken down into test steps and are usually written in TestRail or another cloud based service although some may still use excel.</p><p>Now the whole process is fairly simple however it is very time consuming as you would also need to maintain them constantly. So let’s have a look at how we could streamline some of this process using GPT.</p><p>If we imagine that this is our basic Jira ticket, instead of breaking this down into different steps as we would normally do, we can simply copy this into the ChatGPT and let it generate the test steps for us.</p><p><strong>Acceptance criteria<br></strong><em>“As a user I should be able to sign up to the application”</em></p><p><strong>Screen fields<br></strong><em>name, surname, email, password</em></p><p><strong>Functionality<br></strong><em>Verification email is sent and must be accepted</em></p><p><strong>GPT Results</strong></p><blockquote>1. Navigate to the sign-up page of the application.</blockquote><blockquote>2. Verify that the sign-up form is displayed and includes the fields for name, surname, email, and password.</blockquote><blockquote>3. Enter a valid name, surname, email, and password in the corresponding fields.</blockquote><blockquote>4. Click the “Sign up” button to submit the form.</blockquote><blockquote>5. Verify that the user is redirected to the email verify screen.</blockquote><blockquote>6. Check the email address provided during sign-up to verify that a confirmation email was received.</blockquote><blockquote>7. Click the confirmation link in the email to complete the sign-up process.</blockquote><blockquote>8. Verify that the user can now log in to the application using the email and password provided during sign-up.</blockquote><blockquote>9. Attempt to sign up again using the same email address, but with a different password.</blockquote><blockquote>10. Verify that an error message is displayed, indicating that the email address is already in use.</blockquote><blockquote>11. Repeat the test using different combinations of valid and invalid input for the name, surname, email, and password fields to ensure that the sign-up process is functioning properly</blockquote><p>As you can see, GPT has generated all of the base steps for this test case automatically. This saves time and effort for the QA engineer, who would otherwise need to write out each step manually. Additionally, these generated steps can be used at the requirement stage to create more detailed and accurate acceptance criteria. This can help to ensure that the product being developed meets the needs and expectations of the customer.</p><p>Another quick example of generating error cases</p><p>User: “can you generate all negative scenarios as well”</p><p><strong>GPT Results</strong></p><blockquote>1. Leave one or more of the required fields (name, surname, email, password) blank, and attempt to sign up.</blockquote><blockquote>2. Enter an invalid email address (e.g. a string of characters that does not include the “@” symbol) and attempt to sign up.</blockquote><blockquote>3. Enter a password that does not meet the minimum requirements (e.g. it is too short or does not include a mix of letters, numbers, and special characters) and attempt to sign up.</blockquote><p>Given the output we can see that GPT is not only capable of generating the steps for a test case, but it can also generate different test scenarios based on the provided requirements. In this case, we used a very generic query to generate negative scenarios, but you can also provide more specific requirements to create even more targeted tests.</p><p>For example, if you know that a certain feature is prone to certain types of defects, you can use GPT to generate test cases that specifically target those defects. This can help to ensure that the tests are as comprehensive and effective as possible, and that all potential issues are identified and addressed.</p><p>Theres actually a lot more to this but I think this small example displays enough of its potential.</p><h3><strong>Generating Cypress Automation Test Scripts</strong></h3><p>Next let’s take a look at how we can use GPT to create automated test scripts more efficiently. We can use the same sign up example from above, the framework in this case will be Cypress.</p><p>As we already have the acceptance criteria and the specific fields we can simply ask it to generate cypress tests based on that.</p><p>User: “Can you generate a cypress test from the above requirements” (Note this is exactly the wording I used)</p><p><strong>GPT Results</strong></p><pre>describe(&#39;Sign-up functionality&#39;, () =&gt; {<br>  it(&#39;Should allow users to sign up&#39;, () =&gt; {<br>    // Define the URL of the sign-up page<br>    const signupUrl = &#39;https://my-application.com/signup&#39;;<br><br>    // Navigate to the sign-up page<br>    cy.visit(signupUrl);<br><br>    // Verify that the sign-up form is displayed and includes the correct fields<br>    cy.get(&#39;form#signup&#39;)<br>      .should(&#39;be.visible&#39;)<br>      .within(() =&gt; {<br>        cy.get(&#39;input#name&#39;).should(&#39;have.attr&#39;, &#39;type&#39;, &#39;text&#39;);<br>        cy.get(&#39;input#surname&#39;).should(&#39;have.attr&#39;, &#39;type&#39;, &#39;text&#39;);<br>        cy.get(&#39;input#email&#39;).should(&#39;have.attr&#39;, &#39;type&#39;, &#39;email&#39;);<br>        cy.get(&#39;input#password&#39;).should(&#39;have.attr&#39;, &#39;type&#39;, &#39;password&#39;);<br>      });<br><br>    // Enter valid input in the sign-up form and submit it<br>    cy.get(&#39;form#signup&#39;)<br>      .within(() =&gt; {<br>        cy.get(&#39;input#name&#39;).type(&#39;John&#39;);<br>        cy.get(&#39;input#surname&#39;).type(&#39;Doe&#39;);<br>        cy.get(&#39;input#email&#39;).type(&#39;john.doe@example.com&#39;);<br>        cy.get(&#39;input#password&#39;).type(&#39;P@ssword1&#39;);<br>        cy.get(&#39;button[type=submit]&#39;).click();<br>      });</pre><p>We can see here it generated a simple Cypress test to sign up, however there’s more we can do. Let’s say that the hardcoded data can be reused somewhere else, we can ask the GPT to fix that.</p><p><strong>GPT Result</strong></p><pre>const signupData = {<br>      name: &#39;John&#39;,<br>      surname: &#39;Doe&#39;,<br>      email: &#39;john.doe@example.com&#39;,<br>      password: &#39;P@ssword1&#39;<br>    };<br><br>cy.get(&#39;input#name&#39;).type(signupData.name);<br>        cy.get(&#39;input#surname&#39;).type(signupData.surname);<br>        cy.get(&#39;input#email&#39;).type(signupData.email);<br>        cy.get(&#39;input#password&#39;).type(signupData.password);<br>        cy.get(&#39;button[type=submit]&#39;).click();</pre><p>In the example shown above, GPT was able to quickly move the hardcoded values into a constant and update the original test code to use those constants instead. Dont get me wrong this is not perfect as it takes sometime to be able to describe what you want to achieve however this type of refactoring can be useful for making the test code more modular and reusable. Additionally, by providing a set of requirements and a sample of the desired test code, it can generate test scripts that are accurate and well-structured. This can save time and effort for the QA engineer, who would otherwise need to write the scripts manually.</p><p>Overall, the use of GPT in QA engineering can greatly simplify and streamline the process of creating automated test scripts. It can help to ensure that the scripts are accurate, comprehensive, and easy to understand, and that they contribute to the overall quality of the product being developed.</p><p>And just to add, this is only a small part of what GPT can offer to QA engineers. It can also be used for tasks such as creating and maintaining test data, analyzing test results, and providing insights and recommendations for improving the quality of the product being developed, saving countless hours, which I will also cover in the next article.</p><h3><strong>What does the future look like?</strong></h3><p>As GPT technology becomes more widely adopted and integrated into various tools and platforms, it is likely to have a significant impact on the work of software engineers. In the future, QA engineers may be able to use GPT-powered tools to quickly and easily generate comprehensive test scripts and test scenarios based on specific requirements and specifications. These tools may also be able to analyze test results and provide insights and recommendations for improving the quality.</p><p>In addition, GPT-powered tools may also be able to integrate seamlessly with popular management platforms such as Jira and TestRail, allowing engineers to easily generate and manage tests within the context of their existing workflows.</p><p>Overall, the future of GPT in QA engineering looks promising, with the potential to greatly simplify and streamline many of the tasks that are essential to ensuring the quality of a product or service. Try it out and see how GPT can improve your QA process.</p><p>Thank you for reading.</p><p><strong>Tools Mentioned</strong></p><p>ChatGPT <a href="https://openai.com/blog/chatgpt/">https://openai.com/blog/chatgpt/</a></p><p>Cypress <a href="https://www.cypress.io/">https://www.cypress.io/</a></p><p>TestRail <a href="https://www.gurock.com/testrail/">https://www.gurock.com/testrail/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8977791e0280" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[XCUI Swift Mocking GraphQL RESTful Way]]></title>
            <link>https://medium.com/swlh/xcui-swift-mocking-graphql-restful-way-6cdf0aacdc72?source=rss-530d4421177a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cdf0aacdc72</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mocking]]></category>
            <category><![CDATA[restful-api]]></category>
            <category><![CDATA[xcuitest]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Tadas Stankevicius]]></dc:creator>
            <pubDate>Sun, 31 May 2020 19:02:27 GMT</pubDate>
            <atom:updated>2020-06-03T15:36:29.060Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sa9amcJdTXLIr6Pec6b8pw.png" /></figure><p>Mocking REST requests is easy when creating automation scripts with XCUI Swift but when your app migrates to GraphQL then it becomes a little more difficult. With REST we are used to having each response coming from a different endpoint which made it simple to intercept and respond but with GraphQL we only have one that we can point to and that’s “/graphql”.</p><p>So how do we solve this problem?</p><p>Well there are several solutions. We can create our own Apollo Client Protocol class and set the cache to pre-load our expected data, we could try and mock the class dependencies unit style or we could create our own independent mock server which automatically handles the queries for us, and so on. However we want it to be black box yet easy enough to maintain. So instead we can go with the simplest option and use the request headers. Each GraphQL request must contain a parameter in the header which distinguishes each operation, this will allow us to capture the header value in our automation code.</p><p>For this example I have chosen to use <a href="https://github.com/httpswift/swifter">Swifter</a> as my REST mocking library. It’s easy to setup, works perfectly with REST requests and its available for both CocoaPods and Carthage. The principle I am showing here works with any mocking library as the only thing you are doing is intercepting each request and responding to the header value.</p><h4><strong>Lets begin</strong></h4><p>Before we proceed here is the sample project which has everything already setup.</p><p><a href="https://github.com/tadas-git/GraphQLXcuiMock/tree/master/XCUITests">tadas-git/GraphQLXcuiMock</a></p><p>Lets start by launching the app and using Charles Proxy to inspect what network requests are being made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BoZUn3BFku-onl8C3LdYmg.png" /></figure><p>We can immediately see that there are 2 /graphql requests and 1 REST call. So now we can save these responses and add them to our test directory.</p><p>I Chose to create separate folders for both just to make it easier to maintain and also in case of a migration it will be easier to track. Its important to note that I have named the .json response files by their operation names, this is something we will need later on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*FSuRmvfQ96shbFA5-3gRsQ.png" /></figure><h4>Setting up a mock server</h4><p>First we create a BaseTest class which will do our setup and tear down for each test, you must also make sure to import “Swifter”.</p><pre>let server = HttpServer()</pre><pre>var requests = [String: [String]]()</pre><pre>lazy var app: XCUIApplication = {<br>    return XCUIApplication()<br>}()</pre><p>We initialize our HTTP server which in this case is Swifter, then we create a dictionary to store our requests. You can of course handle that however you like but in this case I chose to do it this way. Finally initialize the XCUI app.</p><pre>override func setUp() {<br>        super.setUp()</pre><pre>        configureMockServer()<br>        startMockServer(port: 8080)</pre><pre>        continueAfterFailure = false<br>        app.launchArguments = [&quot;UITEST&quot;]<br>        app.launch()<br>}</pre><pre>override func tearDown() {<br>        super.tearDown()<br>        app.terminate()<br>}</pre><p>Now we need to override the <strong>setup</strong> and <strong>teardown</strong> methods. In the setup add 2 methods “<strong>configureMockServer</strong>()” and “<strong>startMockServer</strong>(port:8080)”, we will create those a bit later. Another important part is to add a launch argument, we will need this to make sure that the app is pointing to the <strong>localhost</strong> where we can control the responses. For teardown we just want to terminate the app after each test.</p><h4>Mocking</h4><p>Bellow the class create an extension called BaseTest.</p><pre>extension BaseTest {</pre><pre>}</pre><p>First we need to be able to load our mocked json files, so create a method inside the extension and call it whatever you like, here I called it <strong>getParcedJsonFromFile</strong>.</p><pre>func getParsedJsonFromFile(fileName: String) -&gt; Any {<br>    var json: Any?<br>    let testBundle = Bundle(for: type(of: self))<br>    let url = testBundle.path(forResource: fileName, ofType: &quot;json&quot;)<br>    do {<br>        let jsonData = try Data(contentsOf:URL(fileURLWithPath:url!))<br>        json = try JSONSerialization.jsonObject(with: jsonData)<br>    } catch {<br>        print(error)<br>    }<br>    return json!<br>}</pre><p>When you do add new json files, just make sure that you add them to the correct test target. Here we simply look at resources for .json files and return it.</p><p>Now let’s create our missing configureMockServer function. Before we get into writing the logic, lets understand how its going to work. Every iOS Apollo request will have a header called “<strong>x-apollo-operation-name</strong>” and so we know that using the conventional way of reading the endpoint url is not going to work with graphql as all urls are the same, however we can use this header that each request contains to substitute it as the url path. So rather than allowing the mock library to compare the endpoints we will instead compare the headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RnAktH1nE5GgWlgPokpyPQ.png" /></figure><p>We can see in <strong>Charles Proxy</strong> that the operation name for the first graphql query is “<strong>findAllUsers</strong>”, so in this case this means that your .json file must also be named “findAllUsers.json”. <br>So if you go to your test class or create one if you don’t have it yet, we can add this request to our setup.</p><pre>class UITestSample: BaseTest {<br>    let GETQuestionURL = &quot;/questions?site=stackoverflow&amp;order=desc&amp;sort=votes&amp;tagged=ios&quot;<br>    let GQLFindAllUsersRequest = &quot;graphql_FindAllUsers&quot;<br>    let GQLGetEmailRequest = &quot;graphql_GetEmail&quot;</pre><pre>override func setUp() {<br>    requests[GETQuestionURL] = [&quot;RestQuestionResponse&quot;]<br>    requests[GQLGetEmailRequest] = [&quot;GetEmail&quot;]<br>    requests[GQLFindAllUsersRequest] = [&quot;findAllUsers&quot;]<br>    super.setUp()<br>}</pre><p>In this example I have added all graphql requests and a REST request. Whats important here is the naming convention. When you create a new GraphQL request you must name it “graphql_OperationName” (Ill leave this to you to improve). Next in the setup we need to set the request response and as I mentioned earlier, the response file name must be the same as the operation header value, in this case “findAllUsers” &amp; “GetEmail”. Now we can configure the mock server.</p><p>Go back to the BaseTest extension inside the configureMockServer function and create a new String array. I called it savedOperations. We will store all operation names that belong to the graphql path.</p><pre>var savedOperations = [String]()</pre><p>Next we need to run through the requests dictionary and grab path and response data.</p><pre>requests.forEach { pairInfo in<br>    let path = pairInfo.key<br>    let response = pairInfo.value[0]<br>    let json = getParsedJsonFromFile(fileName: response)</pre><p>The path we get from the key is where you set your “requests[/graphql]” and the response is the value “= [findAllUsers]”. We also set the relevant json data which we know the location of because of the response name we pass.</p><p>Next we need to check if the path is a <strong>/graphql</strong> path</p><pre>if path.contains(&quot;graphql&quot;) {<br>    savedOperations.append(response)<br>    server[&quot;graphql&quot;] = { request_ in<br>        let requestOperation = request_.headers[&quot;x-apollo-operation-name&quot;]!<br>        var gqlJson = self.getParsedJsonFromFile(fileName: response)</pre><p>If the path is “graphql” then we need to add the response name to the savedOperations array which will also be the same as the operation name. After that we do the standard request with the endpoint set to “graphql” and inside we initialize the requestOperation which we get from the <strong>header</strong> “x-apollo-operation-name”.</p><pre>savedOperations.forEach { operation in<br>    if operation == requestOperation {<br>        gqlJson = self.getParsedJsonFromFile(fileName: operation)<br>    }<br>}<br>return HttpResponse.ok(.json(gqlJson))</pre><p>Then all we need to do is run through all of the saved operations in the array and check if the operation value is the same as the current request header and if so then the json is now set to the matching operation. The last part is just sending a HTTP response with the json data.</p><pre>else {<br>  server[path] = { request_ in HttpResponse.ok(.json(json))}                                   }</pre><p>Otherwise if its a REST request then we just use the path variable and send matching response json. That is all for configuring the mock server logic.</p><p>This is how it looks complete</p><pre>func configureMockServer() {<br>    var savedOperations = [String]()<br>    <br>    requests.forEach { pairInfo in<br>        let path = pairInfo.key<br>        let response = pairInfo.value[0]<br>        let json = getParsedJsonFromFile(fileName: response)<br>        <br>        if path.contains(&quot;graphql&quot;) {<br>            savedOperations.append(response)<br>            server[&quot;graphql&quot;] = { request_ in<br>                let requestOperation = request_.headers[&quot;x-apollo-operation-name&quot;]!<br>                var gqlJson = self.getParsedJsonFromFile(fileName: response)<br>                savedOperations.forEach { operation in<br>                    if operation == requestOperation {<br>                        gqlJson = self.getParsedJsonFromFile(fileName: operation)<br>                    }<br>                }<br>                return HttpResponse.ok(.json(gqlJson))<br>             }<br>         } else {<br>             server[path] = { request_ in HttpResponse.ok(.json(json))}<br>         }<br>     }<br>}</pre><p><strong>Starting the mock server</strong></p><pre>func startMockServer(port: UInt16) {<br>    do {<br>        try server.start(port, forceIPv4: true)<br>        print(&quot;server started&quot;)<br>    } catch {<br>        print(&quot;error starting server&quot;)<br>    }<br>}</pre><p>Create a new function in the extension and add the code to start the mock server.</p><p>Everything is now complete on the test end, the last part is to make the GraphQL requests to go through the localhost. There are several ways to do this depending on how your app configuration is setup but for now we will use the simplest method. Find the class in the main project where the GraphQL url is set. In this sample project its in the “GraphQLNetwork.swift” class.</p><pre>var url = URL(string: &quot;https://parseapi.back4app.com/graphql&quot;)!</pre><pre>if ProcessInfo.processInfo.arguments.contains(&quot;UITEST&quot;) {<br>    url = URL(string: &quot;http://localhost:8080/graphql&quot;)!<br>}</pre><p>Since we set the launch argument “UITEST” in the beginning, we can use that to check if the app is running in test mode and if so then we simply set the url to point to localhost.</p><h4>Results</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WzZYoB_hWVsosqne3aZkAg.png" /><figcaption>Mocked REST Request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*REamFZL1d2NWucV8EXJ2bg.png" /><figcaption>Mocked /graphql findAllUsers Operation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0EC5spzoxJ64Pf-JGR6T9w.png" /><figcaption>Mocked /graphql GetEmail Operation</figcaption></figure><p>As you can see the REST request was successful and responded with the correct data as well as the 2 GraphQL requests, each one containing relevant .json responses.</p><h4>Conclusion</h4><p>So in short, the idea is to simply use the headers for GraphQL requests and endpoint urls for REST. You should be able to implement the same logic with whatever mocking library you use for your XCUI tests as all this is really doing is just matching the json to the relevant header.</p><p>Thanks for reading.</p><p>Leave a comment if you have any queries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cdf0aacdc72" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/xcui-swift-mocking-graphql-restful-way-6cdf0aacdc72">XCUI Swift Mocking GraphQL RESTful Way</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>