<?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[Transforming testing with Generative AI - Medium]]></title>
        <description><![CDATA[RelicX leverages Generative AI to enhance software testing by thoroughly testing real-world user flows and ensuring confident releases. It monitors and tests applications exactly as they are used in production, enabling accurate issue identification before impacting end-users. - Medium]]></description>
        <link>https://medium.com/transforming-testing-with-generative-ai?source=rss----829ebc094fd2---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Transforming testing with Generative AI - Medium</title>
            <link>https://medium.com/transforming-testing-with-generative-ai?source=rss----829ebc094fd2---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:49:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/transforming-testing-with-generative-ai" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Transforming End-to-End Testing with Generative Agentic Workflows]]></title>
            <link>https://medium.com/transforming-testing-with-generative-ai/transforming-end-to-end-testing-with-generative-agentic-workflows-c29f4aae6a0a?source=rss----829ebc094fd2---4</link>
            <guid isPermaLink="false">https://medium.com/p/c29f4aae6a0a</guid>
            <category><![CDATA[release-management]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[test-automation]]></category>
            <dc:creator><![CDATA[Sushil Kumar]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 19:19:47 GMT</pubDate>
            <atom:updated>2024-07-19T19:19:47.306Z</atom:updated>
            <content:encoded><![CDATA[<p>The world of software development is abuzz with excitement about how Generative AI is revolutionizing the industry. Thanks to large language models (LLMs), code generation productivity is skyrocketing, leading to an explosion in the volume of code generated. However, all this new code needs to be thoroughly tested before deployment. Testing comes in various forms, with code testing focused on validating whether the new piece of code works as intended. The real challenge lies in conducting end-to-end functional, workflow, and regression testing to ensure that new code not only works well in isolation but also integrates seamlessly with existing application workflows and does not break any existing functionalities. This process is largely manual today, posing a significant bottleneck that could potentially negate the tremendous gains from LLM-assisted coding. So, the pressing question is: how can Generative AI help eliminate these bottlenecks?</p><h3>Can LLMs Generate Usable E2E Test Code?</h3><p>The answer clearly lies in automation. But can LLMs help generate test automation code as easily as they generate code? Unfortunately, the situation is more complex. While LLMs are incredibly useful for generating unit test code, they face significant challenges when it comes to end-to-end (E2E) testing.</p><h4>Why LLMs Excel at Generating Unit Test Code</h4><p>Unit testing focuses on individual units or components of a software application, ensuring that each part functions correctly in isolation. LLMs are adept at unit testing because:</p><ol><li><strong>Well-Defined Inputs and Outputs:</strong> Clear inputs and outputs make it easy for LLMs to generate meaningful test cases.</li><li><strong>Limited Scope:</strong> The narrow focus of unit tests allows LLMs to understand and generate relevant test cases.</li><li><strong>Code Context:</strong> LLMs can analyze dependencies within a small codebase to create accurate unit tests.</li></ol><h4>The Complexity of E2E Testing</h4><p>In contrast, E2E testing involves:</p><ol><li><strong>Complex Interactions:</strong> Replicating real user interactions like clicking buttons and navigating pages.</li><li><strong>Dynamic Elements:</strong> Adapting to changing web elements based on user interactions or data states.</li><li><strong>Iterative Discovery:</strong> Iteratively discovering the next actions based on the application’s current state, requiring adaptiveness and decision-making that LLMs struggle with.</li></ol><h3>Agentic Workflows: Solving the E2E Testing Problem</h3><h4>What Are Agentic Workflows?</h4><p>Agentic workflows refer to automated processes that mimic human decision-making and interaction patterns. In the context of E2E testing, an agentic workflow can autonomously navigate through an application, making decisions and adapting to changes in real time, just like a human tester would. These workflows leverage advanced AI techniques to understand the application’s state, determine the next steps, and execute them iteratively until the entire workflow is completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*spij6EAo3KAVO0qg" /><figcaption>Agentic Workflow for E2E Test Automation</figcaption></figure><h3>What Can the Agentic Test Automation Workflow Do for You?</h3><h4>Automated Intent-Based Testing</h4><p>One of the most promising end goals of automation is the ability to exercise the same degree of flexibility and adaptiveness as manual testing. This can address many pains traditionally associated with automation, such as brittle tests that frequently break whenever the UI changes. Intent-based testing allows the system to understand and execute tasks based on the user’s intent, making the automation process more resilient and adaptable to changes.</p><h4>Dramatically Simplify Test Creation Using Natural Language Prompts</h4><p>While intent-based testing is a medium-to-long-term goal, Generative AI can significantly speed up and simplify test creation today through the use of natural language commands. Although there has been a surge of recorders that make recording simple steps like clicking on links or buttons easier, the real complexity arises in interactions involving business logic. For instance, on a travel booking site, selecting the flight with the lowest fare or booking a room with the lowest price usually requires writing complex scripts. Natural language commands can simplify these interactions by allowing users to specify their requirements in plain language, reducing the need for complex scripting. For a deeper dive into how natural language can simplify automated tests for dynamic pages, check out <a href="https://medium.com/@gurashishbrar/simplifying-automated-tests-for-dynamic-pages-with-relicx-218873b44bc2">this blog post</a>.</p><p>Additionally, natural language can help simplify assertions, which are crucial for verifying that the application behaves as expected. This simplification can make it easier to create comprehensive and accurate test cases</p><p><a href="https://www.linkedin.com/pulse/writing-assertions-easy-asking-question-relicxai-mmz6c/?trackingId=%2F1UJJSbCNdolfEshBnyzMA%3D%3D">Writing Assertions is as easy as asking a question</a></p><h4>Automate Visual Testing</h4><p>UI test automation frameworks often struggle with testing visual elements. However, with the advent of vision models like GPT-V, Generative AI agents can perform visual testing for elements such as canvas bar charts and can even detect visual regressions automatically. This capability expands the boundaries of automation, allowing for more comprehensive testing that includes visual aspects, which are often critical for user experience.</p><h4>Suggest Test Cases to Makes Your Testing More Comprehensive</h4><p>Generative AI can automatically generate test cases, particularly around boundary conditions and negative testing. By exploring edge cases and potential failure points, AI-driven testing can ensure a more thorough examination of the software, catching issues that might otherwise go unnoticed. This comprehensiveness can lead to more robust and reliable applications, reducing the risk of post-deployment failures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qLgd2MFoOeWDBEHt" /><figcaption>AI Generated E2E Test Cases</figcaption></figure><h3>The Road Ahead</h3><p>Integrating Generative AI and agentic workflows in testing can transform the software development lifecycle by automating complex testing and simplifying test creation. This technology overcomes bottlenecks in LLM-assisted coding, democratizes testing, and reflects real-world use cases.</p><p>As models and agents improve, they will revolutionize test creation and maintenance, acting as powerful users and testers. Relicx is leading this transformation with the first Generative AI-powered test automation agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BvMqGgOW41EooqDZGjB8vg.png" /><figcaption>Relicx Generative AI Test Automation Platform</figcaption></figure><p>At Relicx, we are at the forefront of making this transformation happen with the industry’s first Generative AI-powered test automation agent. Our innovative solution leverages the power of Generative AI to automate complex testing processes and simplify test creation, helping you overcome the bottlenecks currently hindering the full realization of LLM-assisted coding productivity. If you want to experience this transformation and take your testing to the next level, <a href="https://app.relicx.ai/signup">sign up</a> to get started.</p><p>Join us in revolutionizing the world of software testing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c29f4aae6a0a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/transforming-testing-with-generative-ai/transforming-end-to-end-testing-with-generative-agentic-workflows-c29f4aae6a0a">Transforming End-to-End Testing with Generative Agentic Workflows</a> was originally published in <a href="https://medium.com/transforming-testing-with-generative-ai">Transforming testing with Generative AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Save time and leave the burden of creating assertions to Relicx Copilot]]></title>
            <link>https://medium.com/transforming-testing-with-generative-ai/save-time-and-leave-the-burden-of-creating-assertions-to-relicx-copilot-375877f3b6b8?source=rss----829ebc094fd2---4</link>
            <guid isPermaLink="false">https://medium.com/p/375877f3b6b8</guid>
            <dc:creator><![CDATA[Relicx ]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 19:15:43 GMT</pubDate>
            <atom:updated>2024-07-19T19:15:29.441Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1PGqNdoXJ48fGZlKAgGyzw.png" /></figure><p>With the advent of user-friendly low and no-code UI test authoring tools, recording tests has become incredibly easy! As someone who may not have much coding experience, I can now effortlessly record end-to-end tests within minutes. However, there’s still a hurdle to overcome when it comes to creating accurate and robust assertions that validate whether each step was executed correctly. In fact, these assertions serve as the bedrock of a well-designed test, so we always encourage our users to include as many assertions as they deem necessary. Yet, we understand that it’s easier said than done. Often, users tend to focus on the functionality they’re testing rather than individual steps, leading them to add assertions as an afterthought.</p><p>We have some exciting news to share about Relicx! We understand that even with our interactive authoring feature, our users were still spending precious time crafting assertions for their UI tests. Well, worry no more! We’re thrilled to introduce AI assertions to Relicx.</p><p>With this new feature, you can bid farewell to the tedious task of manually writing assertions. After each step in your test, Relicx’s AI engine will automatically generate and suggest relevant assertions for you. As you navigate through your app and record your test steps, Relicx intelligently assesses the state and content of each page, providing you with one or more recommended assertions.</p><p>Here’s the best part: These AI assertions are preverified, ensuring they work seamlessly right from the start. When you accept these suggestions, you can trust that they will function flawlessly. And when it’s time to execute your test, the assertions will be executed just like any other step, ensuring comprehensive validation of your application’s functionality.</p><p>We’re confident that this new addition will enhance your testing experience drastically, saving you valuable time and effort. Now you can focus on what truly matters — delivering high-quality software. So get ready to embrace the power of AI-assisted testing with Relicx!</p><p>In the following section I will walk you through an example of the AI assertions but you must give this a try to see it for yourself. Just login ( or <a href="https://app.relicx.ai/signup">signup</a> if you haven’t already) to Relicx and record a test with our Interactive authoring.</p><p>In the test below the user clicks on the “Checking” link which expands the menu on the side bar and then the user clicks on “View Checking”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nALjVDViOq500j_dugcYFw.jpeg" /></figure><p>As you can see on the screenshot above , there are assertions ( highlighted by the red box) that Relicx has recommended.</p><p>I reviewed both and accepted one of them by clicking on the “Add Assertion” button below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lhOg1y8ksgGunAjQ83mLSQ.jpeg" /></figure><p>Once the assertion is accepted, you will see it as a regular step in the test as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*m0_W0rivoqMT9yUdrErFVw.jpeg" /></figure><p>AI assertions are a great productivity boost for testers and developers looking to quickly add end to end tests using Relicx Interactive authoring. <a href="https://app.relicx.ai/signup">Sign up</a> with Relicx today and experience the future of efficient and automated testing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=375877f3b6b8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/transforming-testing-with-generative-ai/save-time-and-leave-the-burden-of-creating-assertions-to-relicx-copilot-375877f3b6b8">Save time and leave the burden of creating assertions to Relicx Copilot</a> was originally published in <a href="https://medium.com/transforming-testing-with-generative-ai">Transforming testing with Generative AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[It takes Generative AI to test Generative AI]]></title>
            <link>https://medium.com/transforming-testing-with-generative-ai/it-takes-generative-ai-to-test-generative-ai-be3821cce03b?source=rss----829ebc094fd2---4</link>
            <guid isPermaLink="false">https://medium.com/p/be3821cce03b</guid>
            <category><![CDATA[web-application-testing]]></category>
            <category><![CDATA[testing-framework]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[chatbot-testing]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <dc:creator><![CDATA[Gurashish Brar]]></dc:creator>
            <pubDate>Thu, 11 Jul 2024 22:03:10 GMT</pubDate>
            <atom:updated>2024-06-24T22:02:40.030Z</atom:updated>
            <content:encoded><![CDATA[<p>With the latest advancements in Generative AI, chatbots are becoming increasingly common. Almost every application now integrates a natural language interface, enabling users to interact with the application and its content seamlessly. However, while developing high-quality chatbots has become relatively straightforward, the testing infrastructure has not kept pace. Traditional testing methods are highly deterministic, relying on carefully crafted datasets with predictable responses. In contrast, Generative AI is inherently non-deterministic, making testing more challenging.</p><h3>Traditional Evaluation Metrics</h3><p>Traditional evaluation metrics such as BLEU, ROUGE, and Perplexity are commonly used to evaluate generative AI models:</p><ul><li><strong>BLEU (Bilingual Evaluation Understudy):</strong> Measures the n-gram overlap between generated text and reference text, providing a quantitative measure of similarity.</li><li><strong>ROUGE (Recall-Oriented Understudy for Gisting Evaluation):</strong> Focuses on the overlap of n-grams, particularly useful for evaluating summarization tasks.</li><li><strong>Perplexity:</strong> Measures how well a probability model predicts a sample. Lower perplexity indicates better performance and greater fluency of the generated text.</li></ul><p>While these metrics are standardized and provide a repeatable quantitative assessment, they have limitations. They often capture surface-level similarities and may not fully reflect the semantic meaning, coherence, or relevance of the generated content. Additionally, <em>implementing these metrics requires significant preparation of reference datasets and technical expertise.</em></p><h3>The Relicx AI Assertions Approach</h3><p>This is where <a href="https://relicx.ai/">Relicx AI</a> Assertions come into play with an easy to use approach that requires zero prior experience or technical knowledge. <a href="https://relicx.ai/">Relicx AI</a> Assertions leverage cutting-edge large language models (LLMs) like GPT-4o and Claude 3.5 to evaluate assertions authored by users. These assertions (demonstrated later in the article) are crafted to assess the quality of chatbot responses. <a href="https://relicx.ai/">Relicx AI</a> Assertions simplify the process of testing chatbot responses by validating them against various criteria, including:</p><ul><li>Valid responses versus errors</li><li>Factual information versus misinformation</li><li>Appropriate versus offensive tone or language</li><li>Code bugs in generated code</li><li>Logical errors</li><li>Hallucinations when evaluating mathematical questions</li><li>Custom verification through one-shot sample</li></ul><p>The elephant in the room is why wouldn’t <a href="https://relicx.ai/">Relicx Agent</a> also hallucinate and have the same problems that the chatbots may exhibit.</p><p>While hallucinations can never be eliminated, they can be significantly mitigated and the answer to this lies in the approach that <a href="https://relicx.ai/">Relicx</a> Agent takes to mitigate the impact:</p><p><strong>Smarter models to test smaller models: </strong><a href="https://relicx.ai/">Relicx</a> uses the smartest models cost-effectively as the testing load is a fraction of production loads. A smarter model (e.g., GPT-4o, Claude 3.5) can validate responses of smaller models more effectively, reducing the chances of hallucinations in testing itself.</p><p><strong>Code generation to evaluate mathematical answers: </strong>One might wonder why Relicx’s LLM wouldn’t also hallucinate on a mathematical question. The answer lies in <a href="https://relicx.ai/">Relicx’s</a> use of code generation and evaluation for mathematical operations. This approach enables <a href="https://relicx.ai/">Relicx AI </a>Assertions to verify mathematical questions with high confidence.</p><p><strong>Augmenting with specific content: </strong>The <a href="https://relicx.ai/">Relicx</a> Agent has a memory that can be augmented with user-specific content, allowing it to validate the correctness of proprietary data unknown to general models.</p><p><strong>Contextual Priming</strong>: Users can provide specific context through memory or one-shot examples. This minimizes the need for model to infer or assume, making the evaluation easier compared to a chatbot that first has to access relevant data through Retrieval-Augmented Generation (RAG) and then summarize. <em>The job of testing LLMs is inherently simpler than that of the chatbot itself.</em></p><h3>Comparison with Chain of Verification (COVe)</h3><p><a href="https://relicx.ai/">Relicx AI</a> Assertions are similar to the Chain of Verification (COVe) prompt engineering technique, where a verification question is used to catch hallucinations. This technique has been demonstrated to reduce hallucinations in LLM responses (Chain-of-Verification Reduces Hallucination in Large Language Models, <a href="https://arxiv.org/abs/2309.11495">arXiv:2309.11495</a>). While in COVe the LLM devises the verification question, in the case of <a href="https://relicx.ai/">Relicx AI </a>Assertions, the human in the loop devises a verification assertion. This human involvement can enhance the accuracy and relevance of the verification process.</p><h3>Practical Application</h3><p>In this article, we explore a sample chatbot that delivers both high-quality responses and occasional errors or misinformation. For demonstration purposes, we have instrumented the chatbot to include erroneous responses to certain questions. We use <a href="https://relicx.ai/">Relicx AI</a> Assertions to validate the chatbot directly through the user interface (UX). There is no need for backend API integration; all <a href="https://relicx.ai/">Relicx</a> requires is access to the web application containing the chatbot.</p><p>We begin by creating a test that opens the chatbot interface in the <a href="https://relicx.ai/">Relicx</a> Interactive Test Authoring page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fh0wDSXEaGb6wicQWGTwSA.png" /></figure><p><strong>Valid responses</strong></p><p>We write a test command to enter the simple query “Hello” into the chatbot’s user text box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3YBnU-ho5KG7TZrPE8WJZg.png" /></figure><p>We can see that the chatbot has responded, but how do we determine if the response is correct or appropriate as part of the test?</p><p>To validate this, we author an AI Assertion (a natural language question validated for truthfulness):</p><p>Assertion: “<em>Did Ava respond to the user’s query appropriately?</em>”</p><p>As we can see, the assertion passed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*Ma5g2jT97bR_dRKGxYQ8eQ.png" /></figure><p>The logs tab shows more details on how <a href="https://relicx.ai/">Relicx</a> Agent evaluated the assertion:</p><blockquote>Question<strong>:</strong> Did ava respond to the user’s query appropriately?<br>Answer true.<br>Explanation: The user greeted Ava with ‘Hello’, and Ava responded <br>with ‘Hi there! How can I help you today?’. <br>This is an appropriate response to a greeting, indicating that Ava<br>is ready to assist the user.</blockquote><p>Now this was a simple query, let’s move on to something more interesting</p><p>We are going to ask Ava: “is horse a mammal?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYGo8u6vpDNdxm14pidi2g.png" /></figure><p>Now we assert if the response is correct and factual</p><p>Assertion: <em>Did ava respond with correct and factual answer?</em></p><p>Again the assertion passed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*5tRN2EpU-lg_lHBYx55YHA.png" /></figure><p>Let’s look at the logs to see what <a href="https://relicx.ai/">Relicx</a> Agent did.</p><blockquote>Question: Did ava respond with correct and factual answer?<br>Answer true.<br>Explanation: Ava responded with a correct and factual answer.<br>The response states that a horse is a mammal and provides accurate information<br>about the characteristics of mammals, such as the presence of mammary glands,<br>neocortex, fur or hair, and three middle ear bones.<br>This is consistent with known biological facts.</blockquote><p><strong>Catching hallucinations</strong></p><p>Ava, like most chatbots, is prone to hallucinations as the model gets tuned and updated?</p><p>Let’s ask Ava a trick question: “<em>How did Lincoln leverage smartphones during the Revolutionary War?</em>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbHRcze05O7cBbocb5FArg.png" /></figure><p>Ava responded, but is it correct and factual?</p><p>With <a href="https://relicx.ai/">Relicx</a>, it’s as simple as stating an obvious question:</p><p>“<em>Did Ava respond to the user’s question about Lincoln with a correct and factual answer?</em>”</p><p>This time, the assertion failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*TDHbaoG5g3Z3dk_zsoEfdw.png" /></figure><p>Let’s again look at the logs for <a href="https://relicx.ai/">Relicx</a> Agent’s reasoning behind failing the assertion:</p><blockquote>Question: Did Ava respond to user’s question about lincoln with correct and factual answer?<br>Answer false.<br>Explanation: Ava’s response to the user’s question about Lincoln is not correct or factual. The response states that Abraham Lincoln revolutionized the Revolutionary War by introducing smartphones, which is historically inaccurate as smartphones did not exist during Lincoln’s time or the Revolutionary War.</blockquote><p>The <a href="https://relicx.ai/">Relicx</a> Agent can catch hallucinations and misinformation generated by a chatbot. But can it detect offensive or inappropriate language?</p><p><strong>Detecting inappropriate language or tone</strong></p><p>What if the chatbot becomes offensive due to bad data in the fine-tuning process (e.g., using Slack conversations for training)?</p><p>Let’s ask this question:</p><p>“<em>Can you help me with my account issue?</em>” (For this demonstration, we’ve intentionally made Ava’s response offensive.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xFrkBla9KNcPxIUZSmhaWg.png" /></figure><p>Now let’s assert with <a href="https://relicx.ai/">Relicx</a> if the answer or the tone is offensive or inappropriate. Since assertion must have a true response, so we must frame the question accordingly</p><p>Assert: <em>Is Ava’s response appropriate?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*CgfYMrpb6iOX3WyLijx0VQ.png" /></figure><p><a href="https://relicx.ai/">Relicx</a> Agent caught the inappropriate response and the logs show the reasoning</p><blockquote>Question: Is Ava’s response appropriate?<br>Answer false.<br>Explanation: Ava’s response ‘Figure it out yourself. I’m not here to do everything for you.’ is inappropriate for a customer service or help chat. This response is unprofessional and does not provide any assistance to the user.</blockquote><p><strong>Catching bugs in generated code</strong></p><p>We’ll ask Ava to generate code to sort an array: “<em>Please write a JavaScript function that sorts an array of numbers</em>.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UKPcMEfrqjntsat4wJJXEw.png" /></figure><p>Ava generated a valid-looking code, but is it bug-free?</p><p>Let’s assert this with <a href="https://relicx.ai/">Relicx</a> Agent:</p><p>Assert: <em>Is the generated code for user’s question correct and bug free?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*7jh8sfaf21Mb8tq__0MFzQ.png" /></figure><p>The assertion failed and we can see what the reason is in the log</p><blockquote>Question: Is the generated code for user’s question correct and bug free?<br>Answer false.<br>Explanation: The generated JavaScript code for sorting an array of numbers<br>contains a bug. Specifically, in the nested for loop, the condition should be<br>‘j &lt; n — i — 1’ instead of ‘j &lt; n — i’. This ensures that the inner loop does not go out of bounds when accessing ‘sortedArray[j + 1]’.</blockquote><blockquote>Therefore, the answer to the question is NO</blockquote><p><a href="https://relicx.ai/">Relicx</a> Agent can catch bugs in generated code and fail the assertion.</p><h3><strong>Handling proprietary data</strong></h3><p>We have demonstrated that <a href="https://relicx.ai/">Relicx</a> Agent-based Assertions can catch a wide variety of issues in chatbot responses. However, many chatbots rely on custom data to answer user questions. How can the <a href="https://relicx.ai/">Relicx</a> Agent help with that?</p><p>To illustrate this we will expand on the Ava chatbot’s capabilities. Let’s say this chatbot is a customer support bot that answers queries of users of an e-commerce application. In this case, Ava would have access to the product catalog and user’s order history.</p><p><strong>One shot learning</strong></p><p>In this case, the assertion itself provides the correct context that needs verification. For example, we will ask Ava a specific question from a test user about the status of their order for <em>shoes.</em></p><p>For the test user, we provided order history and active orders to Ava.</p><p>We will now ask Ava a question about a specific order described below:</p><p>Sample: Order #: 894562, Description: Loafer Shoes, price $52, status: Shipped from warehouse, ETA: 06/29/2024</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*5VQ6r-tJd_42KI_LO_LMfg.png" /></figure><p>Knowing this is based on test data you can provide the correct context in the assertion itself. We now ask the <a href="https://relicx.ai/">Relicx</a> AI Agent using the ETA in the assertion. Even though the <a href="https://relicx.ai/">Relicx</a> agent has no prior knowledge of the order history, the context within the assertion provides enough details to verify correctness.</p><p>Assert: “Is Ava’s response correct given order delivery date is 06/29/2024?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/329/1*Kwpuy8ASUPO8EEXUOgVFcw.png" /></figure><p><a href="https://relicx.ai/">Relicx</a> Agent logs show:</p><blockquote>Question: Is Ava’s response correct given order delivery date is 06/29/2024?Answer false.</blockquote><blockquote>Explanation: Ava’s response states that the order can be expected in about 12 days. Given today’s date is June 22, 2024, adding 12 days would result in a delivery date of July 4, 2024. Since the order delivery date is June 29, 2024, Ava’s response is incorrect.</blockquote><p><strong>Using </strong><a href="https://relicx.ai/"><strong>Relicx</strong></a><strong> Memory</strong></p><p>The <a href="https://relicx.ai/">Relicx</a> Agent has a feature called memory, allowing customers to upload custom content and make the <a href="https://relicx.ai/">Relicx</a> Agent aware of this relevant content. This enables the <a href="https://relicx.ai/">Relicx</a> Agent to assert and validate the correctness of responses based on proprietary data.</p><p>Ava has access to all user’s history through a RAG model, but for testing purpose we can pick a particular test-user and provide the order history of just that user:</p><p>Here is a sample of the test user’s order history for illustration purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*6EjYkaFa2ytfUag_Mdi_JQ.png" /></figure><p>Now we will ask Ava a set of questions that are based on this test user order history</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*7T_xiiWmXUH2uZg4p1Vbnw.png" /></figure><p><a href="https://relicx.ai/">Relicx</a> Logs:</p><blockquote>Question: Did Ava correctly answer user’s question?</blockquote><blockquote>Answer true.</blockquote><blockquote>Explanation: Yes, Ava correctly answered the user’s question. The order for the wireless earbuds was cancelled, so they were not delivered.</blockquote><p>Let’s try another question that is usually the weakness of typical chatbots</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*3zeYvWUVsLDHwovBWI1aEw.png" /></figure><p><a href="https://relicx.ai/">Relicx</a> logs:</p><blockquote>Question: Did Ava correctly answer user’s question?</blockquote><blockquote>Answer false.</blockquote><blockquote>Explanation: Ava did not correctly answer the user’s question. The correct total amount spent on the orders is $1930, not $1462</blockquote><p><a href="https://relicx.ai/">Relicx’s</a> use of code generation and evaluation for mathematical operations enables high confidence verification.</p><h3>Conclusion</h3><p>Testing Generative AI applications presents unique challenges that traditional frameworks often struggle to address. Industry-standard evaluation metrics like BLEU, ROUGE, and Perplexity require deep expertise and the creation of extensive datasets, which can be time-consuming and complex. However, with <a href="https://relicx.ai/">Relicx</a> AI Assertions, testing becomes as straightforward as asking natural language questions to verify responses across a range of issues. By leveraging advanced LLMs and techniques like code generation and user-authored assertions, <a href="https://relicx.ai/">Relicx</a> provides a robust and reliable testing solution for generative AI-based applications.</p><p>Are you building a generative AI application and facing testing challenges? <a href="https://relicx.ai/">Reach out to us — we’re here to help!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be3821cce03b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/transforming-testing-with-generative-ai/it-takes-generative-ai-to-test-generative-ai-be3821cce03b">It takes Generative AI to test Generative AI</a> was originally published in <a href="https://medium.com/transforming-testing-with-generative-ai">Transforming testing with Generative AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplifying Automated Tests for Dynamic Pages with Relicx]]></title>
            <link>https://medium.com/transforming-testing-with-generative-ai/simplifying-automated-tests-for-dynamic-pages-with-relicx-218873b44bc2?source=rss----829ebc094fd2---4</link>
            <guid isPermaLink="false">https://medium.com/p/218873b44bc2</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <dc:creator><![CDATA[Gurashish Brar]]></dc:creator>
            <pubDate>Thu, 11 Jul 2024 22:03:00 GMT</pubDate>
            <atom:updated>2024-06-21T18:54:08.158Z</atom:updated>
            <content:encoded><![CDATA[<p>Writing test automation code, especially for Dynamic pages can be tricky. Traditional selectors often fall short when the target elements change with the content or require dynamic identification. Let’s explore this with an example on Southwest’s flight listing page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jQpDd6NN8WyxSpCFDLVnQQ.png" /></figure><h4>Scenario:</h4><p>We aim to select a Business Select option for a flight departing between 7 am and 9 am. In test automation, such specific actions might be necessary to validate the presence of a flight within a particular time frame.</p><h4>Traditional Approach:</h4><p>Using conventional automation tools, this task involves complex JavaScript code to navigate a custom table structure made of nested divs. The process involves:</p><ol><li>Understanding the table structure by exploring the DOM,</li><li>Identifying the row with a departure time within the desired range.</li><li>Selecting the Business Select column for that row.</li></ol><p>Table structure in the DOM</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*1GJ7SNr_oHk-b0uMn0ignA.png" /></figure><p>Here is a sample JS code that can accomplish this.</p><pre>function getMinutesOfDay(timeString) {<br>  // Match the time and the AM/PM part<br>  const timePattern = /(\d{1,2}):(\d{2})(AM|PM)/;<br>  const match = timeString.match(timePattern);<br><br>  if (match) {<br>    let hours = parseInt(match[1], 10);<br>    const minutes = parseInt(match[2], 10);<br>    const period = match[3];<br><br>    // Convert hours to 24-hour format<br>    if (period === &#39;PM&#39; &amp;&amp; hours !== 12) {<br>      hours += 12;<br>    } else if (period === &#39;AM&#39; &amp;&amp; hours === 12) {<br>      hours = 0;<br>    }<br><br>    // Calculate total minutes of the day<br>    const totalMinutes = hours * 60 + minutes;<br><br>    return totalMinutes;<br>  }<br><br>  return null; // Return null if the input format is incorrect<br>}<br><br>function findFlightRowDepartingBetween(fromTime, toTime) {<br>    const fromMinuteOfDay = getMinutesOfDay(fromTime);<br>    const toMinuteOfDay = getMinutesOfDay(toTime);<br>    if (!fromMinuteOfDay || !toMinuteOfDay) {<br>        return null;<br>    }<br>    const table = document.querySelector(&quot;#air-search-results-matrix-0&quot;);<br>    for(const row of table.children) {<br>        const departureCell = row.querySelector(&quot;.time--value&quot;);<br>        const departureText = departureCell.innerText.split(&quot;\n&quot;)[1];<br>        const departureMinuteOfDay = getMinutesOfDay(departureText);<br>        if (!departureMinuteOfDay) {<br>            continue;<br>        }<br>        if (fromMinuteOfDay &lt;= departureMinuteOfDay &amp;&amp; departureMinuteOfDay &lt; toMinuteOfDay) {<br>            return row;<br>        }<br>    }<br>    return null;<br>}<br><br>const flightRow = findFlightRowDepartingBetween(&quot;7:00AM&quot;, &quot;9:00AM&quot;);<br>const businessCellButton = flightRow.querySelector(&quot;#air-booking-fares-0-4 &gt; div:nth-child(1) &gt; button&quot;)<br>businessCellButton.click();</pre><p>This is nontrivial code and it contains assumptions that can break easily:</p><ul><li><strong>Table layout:</strong> The layout and organization of rows/cells with nested divs can change</li><li><strong>Time Field Structure:</strong> The unstructured nature of the time field and potential layout/format changes necessitate frequent updates to the getMinutesOfDay function.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*WfYSrHwnVjaHSgAWwWXq0A.png" /></figure><ul><li><strong>Brittle Selectors:</strong> The selectors are prone to breaking if the layout, IDs, or class values change.</li></ul><h4>Simplified Solution with Relicx:</h4><p>With Relicx, developers can bypass complex logic and focus on the desired test outcome. By using natural language commands, Relicx Agent automatically identifies the correct elements to interact with, simplifying the entire process.</p><p><strong>Natural Language Command:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*Bo9-XhbNgJDx8qJ5_-MkGg.png" /><figcaption>Select business select option that departs between 7 am to 9 am</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*xN7Q2qeMnEq94PWeczlEUg.png" /></figure><p>Relicx’s agent handles the intricacies, ensuring that the specified action is performed accurately without the need for detailed code.</p><p>A short video demonstrating Relicx Agent in action</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.loom.com%2Fembed%2F60dd5c520d564853912319f508f1971b&amp;display_name=Loom&amp;url=https%3A%2F%2Fwww.loom.com%2Fembed%2F60dd5c520d564853912319f508f1971b%3Fsid%3D74859ba3-f28c-44ef-b127-19576293abd3&amp;image=https%3A%2F%2Fcdn.loom.com%2Fsessions%2Fthumbnails%2F60dd5c520d564853912319f508f1971b-1718995658668.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=loom" width="1920" height="1440" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca50fd5cfcc4a1bff2340dffe8e894ff/href">https://medium.com/media/ca50fd5cfcc4a1bff2340dffe8e894ff/href</a></iframe><h4>Conclusion:</h4><p>Relicx revolutionizes test automation by allowing developers to define “what-to-test” rather than “how-to-test.” This shift reduces complexity, enhances efficiency, and minimizes maintenance efforts, making automated testing more robust and adaptable to changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*IE3NOQ9Bo-A7Ji61gF6jEQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=218873b44bc2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/transforming-testing-with-generative-ai/simplifying-automated-tests-for-dynamic-pages-with-relicx-218873b44bc2">Simplifying Automated Tests for Dynamic Pages with Relicx</a> was originally published in <a href="https://medium.com/transforming-testing-with-generative-ai">Transforming testing with Generative AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing Assertions is as easy as asking a question]]></title>
            <link>https://medium.com/transforming-testing-with-generative-ai/writing-assertions-is-as-easy-as-asking-a-question-94d51985d2dd?source=rss----829ebc094fd2---4</link>
            <guid isPermaLink="false">https://medium.com/p/94d51985d2dd</guid>
            <category><![CDATA[qa-testing]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[e2e-testing]]></category>
            <category><![CDATA[developer-productivity]]></category>
            <dc:creator><![CDATA[Relicx ]]></dc:creator>
            <pubDate>Tue, 09 Jul 2024 23:10:10 GMT</pubDate>
            <atom:updated>2024-07-08T21:21:47.637Z</atom:updated>
            <content:encoded><![CDATA[<p>Relicx simplifies the process of writing assertions. For example, consider the checkout page of the <a href="https://www.saucedemo.com/v1/checkout-step-two.html">SwagLabs e-commerce app</a>. In this scenario, a user has added three items to their cart and needs to assert that the sum of the individual item prices equals the total item price.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97dFpAVkDhtDiiRCfFGZ4g.png" /><figcaption>Swaglabs Checkout Page</figcaption></figure><p>Using a scripting tool like Cypress, the user can write a few lines of code (as shown below) to define this assertion.</p><pre>describe(&#39;Cart Total Verification&#39;, () =&gt; {<br>  it(&#39;should verify that the sum of item prices equals the item total&#39;, () =&gt; {<br>    cy.visit(&#39;https://www.saucedemo.com/v1/checkout-step-two.html&#39;);<br><br>    // Retrieve the prices of individual items<br>    let itemPrices = [];<br>    cy.get(&#39;#checkout_summary_container &gt; div &gt; div.cart_list &gt; div:nth-child(3) &gt; div.cart_item_label &gt; div.inventory_item_price&#39;).each(($el) =&gt; {<br>      const priceText = $el.text().replace(&#39;$&#39;, &#39;&#39;);<br>      const price = parseFloat(priceText);<br>      itemPrices.push(price);<br>    });<br><br>    // Calculate the sum of item prices<br>    let sumOfPrices = 0;<br>    cy.wrap(itemPrices).each((price) =&gt; {<br>      sumOfPrices += price;<br>    });<br><br>    // Retrieve the item total<br>    cy.get(&#39;#checkout_summary_container &gt; div &gt; div.summary_info &gt; div.summary_subtotal_label&#39;).invoke(&#39;text&#39;).then((itemTotalText) =&gt; {<br>      const itemTotal = parseFloat(itemTotalText.replace(&#39;Item total: $&#39;, &#39;&#39;));<br><br>      // Assert the sum of prices equals the item total<br>      expect(sumOfPrices).to.eq(itemTotal);<br>    });<br>  });<br>});</pre><p>In Relicx, this process is incredibly simple. You can just ask the Relicx Copilot to verify the question as follows:</p><ul><li><strong>“Can you confirm that the sum of the prices of the items in the cart is equal to the item total?</strong>”</li></ul><p>That’s it — no coding required. The Relicx Copilot automatically generates the code and verifies the total for you in just a few seconds. In the video below, you can see how the assertion is created and executed in Relicx.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-Psnby3LB00%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-Psnby3LB00&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-Psnby3LB00%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a76a6c54afbd7253430c5cdfbdbb7da/href">https://medium.com/media/3a76a6c54afbd7253430c5cdfbdbb7da/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94d51985d2dd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/transforming-testing-with-generative-ai/writing-assertions-is-as-easy-as-asking-a-question-94d51985d2dd">Writing Assertions is as easy as asking a question</a> was originally published in <a href="https://medium.com/transforming-testing-with-generative-ai">Transforming testing with Generative AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>