<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://docs.testflair.ai/blog</id>
    <title>TestFlair Blog</title>
    <updated>2026-10-28T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://docs.testflair.ai/blog"/>
    <subtitle>TestFlair Blog</subtitle>
    <icon>https://docs.testflair.ai/img/testflair-icon.svg</icon>
    <entry>
        <title type="html"><![CDATA[Generate Playwright tests from Jira user stories]]></title>
        <id>https://docs.testflair.ai/blog/playwright-tests-from-jira-stories</id>
        <link href="https://docs.testflair.ai/blog/playwright-tests-from-jira-stories"/>
        <updated>2026-10-28T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[How to import user stories from Jira into TestFlair, generate test cases and Java Playwright scripts from them, and run the tests in the cloud or from CI.]]></summary>
        <content type="html"><![CDATA[<p>Most teams already write down what a feature should do. It lives in Jira, as user stories with acceptance criteria. The slow part is turning those stories into tests someone has to write, maintain and run.</p>
<p>This post walks through doing that in TestFlair: pull the stories in from Jira, generate test cases, generate Java Playwright scripts from them, and run the tests in the cloud or from your CI pipeline.</p>
<h2 class="anchor anchorTargetStickyNavbar_sDfD" id="connect-jira">Connect Jira<a href="https://docs.testflair.ai/blog/playwright-tests-from-jira-stories#connect-jira" class="hash-link" aria-label="Direct link to Connect Jira" title="Direct link to Connect Jira" translate="no">​</a></h2>
<p>Open the Jira integration from the Integrations Hub. On Jira Cloud (<code>*.atlassian.net</code>) you can sign in with OAuth, which we recommend, or use an API token. Self-hosted Jira connects with a Personal Access Token.</p>
<p>Then tell TestFlair which Jira project goes with which TestFlair project, and which issue type holds your user stories. The full setup is in <a class="" href="https://docs.testflair.ai/jira-integration">Jira Integration</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_sDfD" id="bring-the-stories-in">Bring the stories in<a href="https://docs.testflair.ai/blog/playwright-tests-from-jira-stories#bring-the-stories-in" class="hash-link" aria-label="Direct link to Bring the stories in" title="Direct link to Bring the stories in" translate="no">​</a></h2>
<p>You can import everything at once with <strong>Sync All</strong>, which pulls every story and bug from the mapped project. Anything already imported is marked <strong>Synced</strong>, so running it again is safe.</p>
<p>If you only want some of them, use <strong>Select Specific Items</strong> and search with JQL. For example, to grab only the stories ready for testing:</p>
<div class="language-text codeBlockContainer_CFf0 theme-code-block" style="--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)"><div class="codeBlockContent_NkbH"><pre tabindex="0" class="prism-code language-text codeBlock_AIpX thin-scrollbar" style="background-color:hsl(220, 13%, 18%);color:hsl(220, 14%, 71%);text-shadow:0 1px rgba(0, 0, 0, 0.3)"><code class="codeBlockLines_pvbz"><span class="token-line" style="color:hsl(220, 14%, 71%);text-shadow:0 1px rgba(0, 0, 0, 0.3)"><span class="token plain">project = SHOP AND issuetype = Story AND status = "Ready for QA"</span><br></span></code></pre></div></div>
<p>Stories in Jira are rarely complete. Where a field like the actor, goal or acceptance criteria is empty, TestFlair reads the issue's description and comments and suggests a value, with a confidence score. You accept or reject each suggestion before anything is saved. Each imported story keeps its link back to Jira.</p>
<p>It's worth slowing down here. A story with clear acceptance criteria produces much better test cases than a vague one, and this is the easiest moment to fix it.</p>
<h2 class="anchor anchorTargetStickyNavbar_sDfD" id="generate-test-cases">Generate test cases<a href="https://docs.testflair.ai/blog/playwright-tests-from-jira-stories#generate-test-cases" class="hash-link" aria-label="Direct link to Generate test cases" title="Direct link to Generate test cases" translate="no">​</a></h2>
<p>In the project's <strong>Test Cases</strong> tab, click <strong>Generate Test Cases</strong>. You get test cases for each story, each with preconditions, numbered steps and expected results. They're tagged as <strong>positive</strong> (the happy path), <strong>negative</strong> (bad input and error handling) or <strong>edge</strong> (boundaries).</p>
<p>Read through them. Edit what's wrong, delete what you don't need. The type you leave on each one also shapes the script that gets generated next.</p>
<h2 class="anchor anchorTargetStickyNavbar_sDfD" id="generate-the-playwright-scripts">Generate the Playwright scripts<a href="https://docs.testflair.ai/blog/playwright-tests-from-jira-stories#generate-the-playwright-scripts" class="hash-link" aria-label="Direct link to Generate the Playwright scripts" title="Direct link to Generate the Playwright scripts" translate="no">​</a></h2>
<p>Switch to <strong>Test Scripts</strong> and click <strong>Generate Scripts</strong>, or generate from a single test case if you just want one. Pick <strong>Java</strong> and <strong>Playwright</strong>, check the Flair estimate, and confirm.</p>
<p>The scripts open in the built-in editor. If your project uses the Page Object Model, you'll get page classes and a test class you can edit separately. You can also download everything and run it in your own setup.</p>
<h2 class="anchor anchorTargetStickyNavbar_sDfD" id="run-them">Run them<a href="https://docs.testflair.ai/blog/playwright-tests-from-jira-stories#run-them" class="hash-link" aria-label="Direct link to Run them" title="Direct link to Run them" translate="no">​</a></h2>
<p>To try a single script, open its run view, enter the URL you're testing, set the execution preferences (window size, timeouts, clean session, video recording) and click <strong>Run</strong>. You can watch the browser live while the logs stream beside it. If something fails, you get the screenshot and the error at the exact step, and you can turn it into a bug report from there.</p>
<p>For a batch, create a <strong>test run</strong>: name it, choose Playwright and Java, pick the test cases and start it. After a fix you can start the same run again, and each attempt keeps its own results. Testing something on localhost or a private network? Connect a secure tunnel so the cloud browsers can reach it.</p>
<h2 class="anchor anchorTargetStickyNavbar_sDfD" id="run-them-from-ci">Run them from CI<a href="https://docs.testflair.ai/blog/playwright-tests-from-jira-stories#run-them-from-ci" class="hash-link" aria-label="Direct link to Run them from CI" title="Direct link to Run them from CI" translate="no">​</a></h2>
<p>If you've connected GitHub or GitLab, generate a CI token, save it as <code>TESTFLAIR_CI_TOKEN</code>, and paste in the snippet TestFlair builds for the test runs you choose. Your pipeline then starts the runs, waits for them, and fails the build if a test case fails. Details are in <a class="" href="https://docs.testflair.ai/git-integrations">GitLab &amp; GitHub</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_sDfD" id="the-whole-flow-at-a-glance">The whole flow at a glance<a href="https://docs.testflair.ai/blog/playwright-tests-from-jira-stories#the-whole-flow-at-a-glance" class="hash-link" aria-label="Direct link to The whole flow at a glance" title="Direct link to The whole flow at a glance" translate="no">​</a></h2>
<table><thead><tr><th>Step</th><th>Where in TestFlair</th></tr></thead><tbody><tr><td>Connect Jira</td><td>Integrations Hub → Jira</td></tr><tr><td>Import stories</td><td>Jira import (Sync All or JQL)</td></tr><tr><td>Generate test cases</td><td>Test Cases → Generate Test Cases</td></tr><tr><td>Generate scripts</td><td>Test Scripts → Generate Scripts → Java + Playwright</td></tr><tr><td>Run</td><td>Script run view, or a test run</td></tr><tr><td>Gate CI</td><td>GitHub Actions or GitLab CI with <code>TESTFLAIR_CI_TOKEN</code></td></tr></tbody></table>
<p>Want to try it on your own Jira project? You can <a href="https://testflair.ai/signup" target="_blank" rel="noopener noreferrer" class="">start free</a>.</p>]]></content>
        <author>
            <name>TestFlair Team</name>
            <uri>https://testflair.ai</uri>
        </author>
        <category label="Jira" term="Jira"/>
        <category label="Playwright" term="Playwright"/>
        <category label="Test automation" term="Test automation"/>
    </entry>
</feed>