<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yosuke Kobayashi</title>
    <description>The latest articles on DEV Community by Yosuke Kobayashi (@y-kobayashi).</description>
    <link>https://dev.to/y-kobayashi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2968515%2F63ace267-023a-4b3c-a346-82b3657152af.gif</url>
      <title>DEV Community: Yosuke Kobayashi</title>
      <link>https://dev.to/y-kobayashi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/y-kobayashi"/>
    <language>en</language>
    <item>
      <title>Laravel x GPT-4o” Makes Browser Testing Super Efficient! Introducing the most powerful tool!</title>
      <dc:creator>Yosuke Kobayashi</dc:creator>
      <pubDate>Sun, 23 Mar 2025 15:39:28 +0000</pubDate>
      <link>https://dev.to/y-kobayashi/laravel-x-gpt-4o-makes-browser-testing-super-efficient-introducing-the-most-powerful-tool-37ga</link>
      <guid>https://dev.to/y-kobayashi/laravel-x-gpt-4o-makes-browser-testing-super-efficient-introducing-the-most-powerful-tool-37ga</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;"I want to automate tests, but writing test code is a hassle..."&lt;/p&gt;

&lt;p&gt;"It's hard to modify test code every time the UI changes..."&lt;/p&gt;

&lt;p&gt;"Errors occur and it doesn't work..."&lt;/p&gt;

&lt;p&gt;Many developers might have these concerns. In this article, we'll introduce a tool that super-efficiently combines generative AI and Laravel Dusk for browser testing.&lt;/p&gt;

&lt;h1&gt;
  
  
  Table of Contents
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Laravel's Test Automation Tools&lt;/li&gt;
&lt;li&gt;Browser Testing × Generative AI&lt;/li&gt;
&lt;li&gt;Environment Setup&lt;/li&gt;
&lt;li&gt;Test Case Generation&lt;/li&gt;
&lt;li&gt;Test Execution&lt;/li&gt;
&lt;li&gt;Summary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you don't need the introduction, please proceed to 3. Environment Setup.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Laravel's Test Automation Tools
&lt;/h1&gt;

&lt;p&gt;Laravel has two built-in test automation tools:&lt;/p&gt;

&lt;h2&gt;
  
  
  Unit Testing with PHPUnit
&lt;/h2&gt;

&lt;p&gt;Unit testing is a testing method that verifies individual parts of an application independently. In Laravel, PHPUnit is integrated as the default testing framework, allowing developers to automate unit tests and improve code quality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://laravel.com/docs/11.x/testing" rel="noopener noreferrer"&gt;Laravel 11.x Testing&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Browser Testing with Laravel Dusk (WebDriver)
&lt;/h2&gt;

&lt;p&gt;Browser testing is a type of E2E (End to End) testing that verifies the flow of web applications. Laravel Dusk is a browser test automation tool developed for the Laravel framework, using WebDriver to automate actual browser operations. With this tool, you can smoothly execute E2E tests from UI operations like button clicks and form submissions to verifying dynamically changing screens.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://laravel.com/docs/11.x/dusk" rel="noopener noreferrer"&gt;Laravel 11.x Laravel Dusk&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Characteristics of Unit Testing and Browser Testing
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Unit Testing&lt;/th&gt;
&lt;th&gt;Browser Testing&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Test Script Creation&lt;/td&gt;
&lt;td&gt;X Required&lt;/td&gt;
&lt;td&gt;X Required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test Execution&lt;/td&gt;
&lt;td&gt;O Fast&lt;/td&gt;
&lt;td&gt;X Slow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Client-side Processing Tests&lt;/td&gt;
&lt;td&gt;X Cannot test JavaScript, etc., as it doesn't run in a browser&lt;/td&gt;
&lt;td&gt;O Can test E2E including JavaScript as it runs in a browser&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maintainability (UI changes, etc.)&lt;/td&gt;
&lt;td&gt;O Less affected by specification changes as it mainly verifies business logic&lt;/td&gt;
&lt;td&gt;X Sensitive to element specification and easily affected by specification changes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  2. Browser Testing × Generative AI
&lt;/h1&gt;

&lt;p&gt;Despite its drawbacks, browser testing is very powerful as it can test E2E including JavaScript. We'll improve the issues of test script creation and maintainability in browser testing by utilizing generative AI (GPT-4o).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Browser Testing&lt;/th&gt;
&lt;th&gt;Improvement Direction&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Test Script Creation&lt;/td&gt;
&lt;td&gt;X Required&lt;/td&gt;
&lt;td&gt;Automatically generate code from natural language&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test Execution&lt;/td&gt;
&lt;td&gt;X Slow&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Client-side Processing Tests&lt;/td&gt;
&lt;td&gt;O Can test E2E including JavaScript as it runs in a browser&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maintainability (UI changes, etc.)&lt;/td&gt;
&lt;td&gt;X Sensitive to element specification and easily affected by specification changes&lt;/td&gt;
&lt;td&gt;Specify elements in natural language like "confirm button" or "search form"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Automatically Generate Code from Natural Language
&lt;/h2&gt;

&lt;p&gt;Using generative AI, you can automatically generate code by instructing user operations in natural language.&lt;br&gt;
For example, if you write this instruction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    public function testQiita(): void
    {
        $this-&amp;gt;browse(function (Browser $browser) {
            // Navigate to qiita.com
            // Enter "blocs" in the search form and press return
            // Click the link of the top article
        });
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will automatically generate code like this. You can run browser tests by executing the generated code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    public function testQiita(): void
    {
        $this-&amp;gt;browse(function (Browser $browser) {
            // Navigate to qiita.com
            $browser-&amp;gt;visit('https://qiita.com');

            // Enter "blocs" in the search form and press return
            $browser-&amp;gt;type('input[name="q"]', 'blocs')
                -&amp;gt;keys('input[name="q"]', \Facebook\WebDriver\WebDriverKeys::ENTER)
                -&amp;gt;pause(1000);

            // Click the link of the top article
            $browser-&amp;gt;scrollIntoView('.style-1kxl4ny')
                -&amp;gt;clickLink('【Laravel】Template engine を作ってみた')
                -&amp;gt;pause(1000);
        });
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Specify Elements in Natural Language like "Confirm Button" or "Search Form"
&lt;/h2&gt;

&lt;p&gt;The generative AI analyzes the HTML of the displayed page and retrieves CSS selectors for input fields or buttons specified in natural language. This allows you to specify elements in natural language like "search form" or "confirm button". Even if UI changes cause errors in browser tests, you can resolve errors by simply regenerating the code without changing the instructions.&lt;br&gt;
For example, in this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Click the confirm button, then click the update button in the modal
$browser-&amp;gt;press('Confirm')
    -&amp;gt;waitFor('#modalUpdate')
    -&amp;gt;press('#modalUpdate .btn-primary');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even if the button class changes, it will generate code that matches the UI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Click the confirm button, then click the update button in the modal
$browser-&amp;gt;press('Confirm')
    -&amp;gt;waitFor('#modalUpdate')
    -&amp;gt;press('#modalUpdate .btn-secondary');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have developed a package that supports Laravel Dusk code generation with generative AI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/blocs/dusk" rel="noopener noreferrer"&gt;https://github.com/blocs/dusk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can super-efficiently perform browser testing in just these 3 steps. Generative AI only supports step 2 (Test Script Creation). While using GPT-4o incurs costs per token, once test script creation is complete, there are no costs for test execution.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Environment Setup&lt;/li&gt;
&lt;li&gt;Test Script Creation&lt;/li&gt;
&lt;li&gt;Test Execution&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  3. Environment Setup
&lt;/h1&gt;

&lt;p&gt;When using this package, you don't need to install it directly in the Laravel project you're testing. As long as the project you're testing is accessible from a browser (running as a development server or staging environment), you can build a separate Laravel project for testing and run tests from there.&lt;/p&gt;

&lt;p&gt;LLM usage is required for test code generation, so if you don't have one, please obtain an OpenAI API key. &lt;a href="https://platform.openai.com/api-keys" rel="noopener noreferrer"&gt;How to obtain an OpenAI API key&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Required Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;PHP 8.1 or higher&lt;/li&gt;
&lt;li&gt;Composer&lt;/li&gt;
&lt;li&gt;Laravel 10 or higher&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setup Commands
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Create a Laravel Project for Testing
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer create-project laravel/laravel &lt;span class="o"&gt;[&lt;/span&gt;project name]
Example: composer create-project laravel/laravel dusk-web-test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Install blocs/dusk
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;dusk-web-test
composer require &lt;span class="nt"&gt;--dev&lt;/span&gt; blocs/dusk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Install Laravel Dusk and Open AI
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan dusk:install
php artisan openai:install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Run Laravel Dusk
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan dusk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Errors may occur on the first execution. In that case, please run it again.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Set up env
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-api-key-here
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This completes the environment setup.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Test Script Creation
&lt;/h1&gt;

&lt;p&gt;The directory structure related to testing is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dusk-web-test/
├─ config/
│   └─ openai.php/
├─ tests/
│   ├─ Browser/
│   │   ├─ ExampleTest.php
│   │   ├─ QiitaTest.php
│   │   ├─ blocs/
│   │   │   ├─ system.md
│   │   │   ├─ user.md
│   │   │   ├─ sample.md
│   │   │   └─ assistant.md
│   │   ├─ screenshots/
│   │   └─ ...(other directories omitted)
│   ├─ Feature/
│   ├─ Unit/
│   └─ DuskTestCase.php
└─ ...(other directories omitted)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Browser test scripts (like ExampleTest.php) are placed under tests/Browser. Files under tests/Browser/blocs have roles set for code generation. By editing these files, such as sample code, you can improve the accuracy of code generation for each project. &lt;a href="https://platform.openai.com/docs/guides/chat/introduction" rel="noopener noreferrer"&gt;What is "role" in OpenAI API&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;system.md&lt;/td&gt;
&lt;td&gt;Specify the overall context of the conversation, such as AI behavior and attitude&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;user.md&lt;/td&gt;
&lt;td&gt;Specify what to do (tasks) and constraints, set appropriate conditions for each project to generate optimal code for that system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sample.md&lt;/td&gt;
&lt;td&gt;Specify sample code, set code generation examples and specifications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;assistant.md&lt;/td&gt;
&lt;td&gt;Specify rules for generating code&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  4.1 Prepare Test Script
&lt;/h2&gt;

&lt;p&gt;Write instructions for the operations you want to perform as comments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    public function testBasicExample(): void
    {
        $this-&amp;gt;browse(function (Browser $browser) {
            // Navigate to http://dev.local/login
            // Enter ID:admin, Password:admin and login
            // Click the User link in the side menu, specify the link with a CSS selector
            // Click the new button from the list screen
            // Enter a random email in userID and check the admin checkbox
            // Enter a random password in password, enter the same password in repassword
            // Click the Confirm button then press the submit button
        });
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also include multiple test cases in one test script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    private function testQiita($browser): void
    {
        $this-&amp;gt;browse(function (Browser $browser) {
            // Navigate to qiita.com
            // Enter "blocs" in the search form and press return
            // Click the link of the top article
        });
    }

    private function testYahoo($browser): void
    {
        $this-&amp;gt;browse(function (Browser $browser) {
            // Navigate to yahoo.co.jp
            // Enter "generative AI" in the input form and click the search button
            // Confirm that ChatGPT is displayed
        });
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4.2 Create Test Script
&lt;/h2&gt;

&lt;p&gt;Run the support tool with this command. When you run the support tool, command selection will be displayed. (You can select with ↑↓.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan blocs:dusk tests/Browser/ExampleTest.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;testXXX edit&lt;/td&gt;
&lt;td&gt;Generate code for the specified test case&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;run&lt;/td&gt;
&lt;td&gt;Run the specified test script (without querying Gpt-4o)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;quit&lt;/td&gt;
&lt;td&gt;Exit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Code generation for test cases is done interactively step by step. If code for a step has already been generated, that step is automatically executed. If code has not yet been generated, it automatically generates code for the operation instructed in the comment. Select the command for the automatically generated code.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;execute&lt;/td&gt;
&lt;td&gt;Execute the generated code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;retry&lt;/td&gt;
&lt;td&gt;Re-execute the same code when an error occurs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free input&lt;/td&gt;
&lt;td&gt;Regenerate code with additional instructions&lt;br&gt;Example: Please correctly specify the login button with a CSS selector&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;skip&lt;/td&gt;
&lt;td&gt;Skip this step&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;quit&lt;/td&gt;
&lt;td&gt;End automatic generation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;After automatic generation of all steps is complete, you can add steps.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free input&lt;/td&gt;
&lt;td&gt;Add a new step&lt;br&gt;Example: Log out&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;quit&lt;/td&gt;
&lt;td&gt;End automatic generation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Specifying the LLM Model
&lt;/h3&gt;

&lt;p&gt;In the default settings when introducing the package, it combines gpt-4o-mini and gpt-4o to generate code. Basically, it uses gpt-4o-mini, and queries gpt-4o when adding instructions to regenerate code. If you want to specify the model to use, write it in config/openai.php. If specified like this, it will always use gpt-4o-mini.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'model' =&amp;gt; 'gpt-4o-mini',
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4.3 Dry Run
&lt;/h2&gt;

&lt;p&gt;You can perform a dry run of the test by executing the run command of the support tool. When actually executed, it looks like this.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/mmViCMeAUbA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Test Execution
&lt;/h1&gt;

&lt;p&gt;Executing this command will run the test script with Laravel Dusk. Laravel Dusk executes browser tests in headless mode, so it operates in the background without displaying a screen. As long as there are no specification changes such as UI changes, you can perform regression testing by executing this command. If you need to modify the test script, go back to test script creation and make modifications.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan dusk tests/Browser/ExampleTest.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  6. Summary
&lt;/h1&gt;

&lt;p&gt;In this article, we introduced a tool that super-efficiently performs browser testing with Laravel Dusk × GPT-4. If you're interested, please give it a try!&lt;/p&gt;

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

&lt;p&gt;Our company is also developing a template engine to make Laravel development more convenient.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blocs.jp/" rel="noopener noreferrer"&gt;BLOCS Official Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://qiita.com/hyada/items/a0aec797d81469b15bf3" rel="noopener noreferrer"&gt;【Laravel】I Created a Template Engine&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://laravel.com/docs/dusk" rel="noopener noreferrer"&gt;Laravel Dusk Official Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://platform.openai.com/docs/api-reference" rel="noopener noreferrer"&gt;OpenAI API Reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
