Junie is intellij`s AI agent, which is very helpful for working on code, I find it better then github copilot because its taks planning and implementation is more helpful then github copilot for me.

And couple of months ago I was doing a small demo to show how to use vscode with github copilot and playwright. The idea is LLM will use the playwright and write all tests and it will explore the site, this is good because it feels like you are showing your product to a fresh eyes, when we are writing/developing we may miss many things, this LLM approach is good for learning how others can act and it will find in time how to use the site and it will write the test scenario we want. I Longer details for vscode check here.

I have been trying to do same with Junie in intellij and failing, this weekend figured it out. Here are the steps

  1. Enable MCP server in intellij https://youtu.be/1HvxI89dRs8
  1. Define Playwright MCP

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}
  1. Ask Junie to use Playwright MCP to write the tests for the target site. Do not forget to give details like username password and what LLM should scan for like which links and what scenario is in the target.

Here you can see the full scenario how you can use Junie to create the test