Generate UI Tests with TestSprite MCP Server + TRAE

Alejandro AO · Beginner ·💻 AI-Assisted Coding ·10mo ago

Key Takeaways

The video demonstrates how to generate UI tests using TestSprite MCP Server and TRAE, covering the process of creating a Product Requirements Document (PRD) with TRAE, coding an app in Next.js, and stress-testing the application with TestSprite's automated AI test suite.

Full Transcript

Good morning everyone. How's it going today? Welcome back to the channel. In today's video, I'm going to be showing how to vibe code a complete application. Uh now, if you know me, you probably know that I am not completely on board with this whole vibe coding thing. I think that you should have some background that really understand what's going on behind your application. But today, we are I mean the new features and the new uh tools that we're getting for AI coding are just amazing. So, I'm going to show you what I would do if I were to actually v code an application over the weekend. Uh, I'm going to be using two main tools. So, I'm going to be using my AI coding tool. Uh, in this case, I'm going to be using Trey. I do use cursor most of the time, but recently I've been trying out Trey. Just wanted to show it to you. Uh, it's a great competitor. Uh, and you'll see how it works. It's um, uh, it's great. And once that tray has finished creating my application, I'm actually going to validate it using Testrite. Now, something interesting about this is that when you code your applications completely using an LLM, usually the LLM will have a little bit of trouble identifying where the edge cases are and where the weird errors are going to be or maybe some things in your UI, etc. And test sprite is precisely here to bridge that gap between the LLM application that you just finished and the actual production ready application or an actual application that actually works. So what they do is they have an MCP server that you just add to your ID and after you have finished VIP coding your application, you just run the MCP server and it is going to generate all of the validation tests of all the edge cases that it can figure out about your application. Run them and give you a report about all of those edge cases. And then you can feed that report back to your coding assistant and then it will just fix everything and all the edge cases so that you finally have an application that works. And what we're going to be building is a very quick flashc card application with some authentication right here. Uh you can essentially uh log in, you have a dashboard, you can create new decks of flashcards and then once you have your decks you can just click on study deck, check the answers and there you go. That's essentially what we're going to be building. very straightforward and you would usually think that you can oneshot it with an LLM, but you will see how using these tools will help you quite a bit. Um, let me know in the comments if you're pro or against uh LLMs and VIP coding applications. Uh, feel free to let me know. Very interested. So, without any further ado, let's get right into it. [Music] Uh so let's uh actually uh start this up. I'm going to try to build the entire application right here in front of you. Hopefully it goes well. So I'm going to build the prd file right here. And this file is going to have the entire description of my application and how it is supposed to work. Okay. And then afterwards I'm going to run my MCP server on top of this one to validate it. So, I'm going to ask uh first Trey to build my PRD for me. So, I'm going to say, "Hey, Trey, uh please build or write a PRD right here." That should be for a complete flashc card application. You should build this in Nex.js and it should be an application that basically allows you to go through some flash cards. It should have some au authentication system. Although do not connect it to any database. Everything is going to be in development environment right now. So just put everything into a simple in-memory system. You can store everything in an array or something like that. And uh then when I reload the application, it's okay if it erases itself. Uh write the PRD and be very detailed and very precise because this is what we're going to be using to actually build the application. So let's get right into it. There we go. And let's send it over. All right. So it generated a very detailed PRD. I went over it very quickly to try to validate that everything makes sense. Didn't read the whole thing cuz this is just a demo, but uh it all makes sense. Uh it's supposed to be able to run without me having to set up any database or anything. So that's good news. Otherwise, I would have uh extra job here. Uh so let's uh try to have it build it. So I'm going to say now build the application. And by the way, I am using Willow Voice. The link is in the description if you're interested in dictating your application like this. It's definitely a pretty cool app. Uh so let's see what it does. So uh the cool thing about Trey is that it actually makes a list of the whole thing of the entire uh task list of tasks that it has to complete. So for example, it will initialize the nextjs project, set up the project structure, create the data models, etc. U cursor is great by the way also. I I like both. But uh recently I've been blown away by Trey uh what these guys are doing. Uh it's running some commands. Oh, it's interactive. So, all right. I'm going to continue. Let this run and we'll be back once this vibe coded app is completely done. All right. All right. So, it seem to has finished. It seem to have finished. Uh let's take a look at the result. So, I'm going to go right here to localhost and let's just sign up right here. I'm going to say Alejandro. My emails is going to be hello@acample.com and my password is going to be one two three four. It's going to create the account. Oops. So now it seems to be working. So let's actually take a look. What I'm going to do is restart the development server. Go back to my to my browser and let's just initialize actually the whole thing right here. Uh let's just actually start it up. I previously created an account with test@acample.com. U the authentication does not seem to be working. Let me see if I can just create it again. Uh create account. Okay. So I am redirected right here to my dashboard. I can Okay, I have my quick actions to create a desk. Browse all desks, all all decks, etc. Okay, manage cards. This one does not seem to do much because I don't have any cards. Can just start a new deck. I'm going to call it test deck right here. Whatever. And I can just start adding cards. Okay, this seems to be working. Okay, add another one. Have different choices. Okay, then I can click on study deck. Oh, this one we have a 404 error. Okay, I'm just going to go back right here to the home right here. Okay. And deck is gone. All right. All right. So this seems kind of a good first step for a first draft for the full stack application. Uh probably in the future I could use chat or something more complete for the front end. I think that this layout is a little bit too minimalist for me. But uh yeah, it seems all right to me. Uh what we're going to be doing now is we're going to be using Testride. Uh what these guys are doing is they are going to generate with AI a bunch of different tests. In this case, we're going to be testing the front end. So, we're going to generate a bunch of different tests and validations to make sure that the application works. And then they're going to run those tests and tell me which ones were which one passed and which one didn't. And for those that did not pass, we're going to get anam a very clear detail of what failed so that in we can just feed that document back into my ID and it will fix the whole thing. Okay. So, let's get right into that. All right. So I have now restarted a development environment and now I'm going to start testing it. Now I could man go manually and start testing my application and all and try to see if it works correctly and validate the whole thing. But I'm just going to want to leverage actually uh test sprite. And in order to actually use it, it's going to be very very straightforward. All you're going to have to do is just go right here to try MCP server. And here you have all the documentation of how to do it. It's very very straightforward. You have a demo of how to install it. very very straightforward. Uh it is compatible of course with any ID that you're using. So cursor uh tray windserve whatever. So I have already installed it myself as you can see right here I am using the builder with the uh tray and as you can see right here in MCP I already have my test sprite um MCP server working. So what I'm going to do right here is basically I'm just going to ask uh my tray to test it using test sprite. So, I'm going to go like this. Um, test this entire application using test sprite. And there we go. Uh, there we go. Just send it over. I'm still using cloud cloud for Sonnet, by the way. And, uh, there you go. That's basically all you have to do. That is going to, uh, start calling the tools that it needs to call. It's going to start setting up the entire development environment and setting up the whole thing. And it should work now. So let's uh wait and see which tools it calls. And there we go. It opened up the test and configuration file right here. Um now right here if you if your application has some authentication, you want to add the the uh login for that. So in my case it is test.acamp test.ample uh test.est.com and the password is this one right here. And the local development port is 3000 if I remember correctly. Uh yeah, there's 30,000. Uh and this is important because this is actually going to create a tunnel kind of like Enro between their cloud and your local development uh server. So that way it will be testing within your actual local development um m um environment. So uh great and then right here you have to actually send the your product uh specification dock or your PRD. So let me just send find it right here from tray uh which is the one that we uh generated from the start. So I'm just going to go right here reitin finder and copy it and paste it right here. And now I should be able to just launch all of the tests from there. Uh you will see that it basically starts working uh by itself and it starts calling a bunch of tools. As I told you, this is agentic. So, it's going to do a bunch of stuff by itself. So, let's just sit down and lay back lay back and um see what it comes up with and if our application is actually working correctly. And there we go. It uh it automatically did a bunch of different stuff. What I did is I just gave it full permission to update and do a bunch of things. Uh and as you can see it already started uh executing the tests and it created a tunnel between my local environment right here and their servers which is where they are actually running the tests and it also generated quite a few files right here. As you see it has the test pride uh front end test uh plan. Uh so these are all the tests that it's going to try to execute to make sure that it works correctly. It has the standard P the standardized uh PRD in a JSON file as well. So that in case you want I mean this is the one that it is using to actually generate the entire set of tests and has the code summary the config bunch of different stuff. Pretty pretty cool actually pretty honestly pretty cool application. Now if you want to take a look at the tests in real time uh right here you can see how many are being uh executed. But what you can do as well is just go back to uh your test sprite account. And of course, since you signed up uh before and everything is connected to your account, you can just go right here. Uh I mean when you sign it, you when you sign on, you're going to enter right here. You're going to MCP tests and here is uh the MCP tests for my application. So as you can see, all of them are running uh right now and they are running in my machine through this tone tunnel. So I'm going to uh leave this like this and get back to you once they are all done uh so that we can validate that the entire application is actually working correctly. So let's go. All right. So as you can see all the tests have uh finished and I did fail a bunch of them. Um just uh to so you know you can actually take a look at what actually was tested by clicking on right here and then you will see an actual video of the playright automation that tried to make your test uh that tested your your application. Right. So here you have the entire thing how it went through it. Just going to speed through this one. You can see that it tests different things. It tries wrong password correct password and changes the username etc until it works correctly. And now after that it works. and that you pass the test. So that's basically what's going on with all the tests. And what happened right now is that it generated this test sprite mcp test report.md. And this is the one that you're going to feed back into your application to I mean into your ID to actually correct the whole thing. So let's do that right now. Now use this test report to fix all the errors that were detected during the testing of this application. And I'm just going to append this one right here. And uh there we go. So, we should be able to run this and I will let this run just for a minute and I will tell you once this is finished. All right. So, let's actually test it out. Now that the test has been finished, we're going to go right here. I'm going to call myself Alejandro. Going to do hello@acample.com. Same thing for the password. And there we go. We're inside now. Everything seems to be working correctly. So, that sounds good. Going to click on new deck right here. Deck name. Going to call it uh test deck. Why not? The description, whatever. Just going to create it. And I can start adding cards right here. So, I'm going to just create it. Um, okay. So, let's just run the study deck. Question one, show answer. There we go. The question two was easy. The question three. Okay. And finally, we have this one right here. Uh it doesn't really show that it is true or false, but uh there we go. Okay. And it actually starts counting which ones were correct and which ones were wrong. I don't know how it knows which ones were correct and which ones was were not actually. Um there we go. Okay. So I guess everything was correct. Um okay. And now we can go back right here. I can edit this card, this deck right here. I have my decks right here. And then I can also go back to the dashboard. Okay. Well, the application seems to be okay. Of course, there are still some details that should be uh taken care of. Um, my recommendation would be that if you're trying to build this application like this, you probably want to use a completely front- end uh uh framework that's already pre-built for you or some library like Shatn to have a better layout and interface. But um there you go. That is pretty much how you create a full stack application in just a few minutes using your ID which could be tray uh winds surf cursor etc. Uh you can also use test sprite for generating the automated AI generated tests. Um and improve just the and just accelerate the way that you validate the entire application. Uh there you go. So seems to be working. Thanks a lot for watching and u yeah have a good one. [Music] [Music]

Original Description

We’ll go step by step through the process of using some tools for generating Apps with AI (vibe coding): generating a clear Product Requirements Document (PRD) with TRAE, coding the app in Next.js with simple in-memory authentication, and stress-testing the application—including tricky edge cases—using TestSprite’s automated AI test suite. --- 🔗 *Links* - 🧪 TestSprite: https://www.testsprite.com/ - 🤖 TRAE (AI Code Editor): https://www.trae.ai/ - 📣 Dictation App (Willow Voice): https://willowvoice.com/?ref=AAO40 - 🚀 Complete AI Engineer Bootcamp: [aibootcamp.dev](https://aibootcamp.dev) - ❤️ Support me: [Buy me a coffee or beer](https://link.alejandro-ao.com/l83gNq) - 💬 Join the Discord Help Server: [Click here](https://link.alejandro-ao.com/HrFKZn) --- 🤓 *Topics Covered* - AI coding assistants overview (TRAE vs Cursor) - Creating a PRD with AI - Building a Next.js app with in-memory authentication & storage - Flashcard features: login, dashboard, deck/card creation, study mode - Setting up TestSprite for AI-driven test automation - Using an MCP server for secure local testing - Automated front-end testing with Playwright - Reading and acting on AI-generated test reports - Refining your app with test-driven feedback loops - Production-ready upgrades (e.g., UI libraries like ShadCN) - Integrating TRAE, TestSprite, and modern IDEs (Cursor, Windsurf, etc.) --- ⏰ *Timestamps* 0:00:00 - Intro 0:02:39 - Generating the PRD with TRAE 0:06:18 - Wrapping up initial build 0:06:31 - LLM Errors 0:08:25 - Running TestSprite 0:13:15 - Debugging & validating results 0:14:35 - Final checks & improvements
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Alejandro AO · Alejandro AO · 57 of 60

1 Linear Regression in R - Full Project for Beginners
Linear Regression in R - Full Project for Beginners
Alejandro AO
2 Configure Webpack 5 in Wordpress (2025) with Typescript and SASS
Configure Webpack 5 in Wordpress (2025) with Typescript and SASS
Alejandro AO
3 R Programming 101 - Crash Course for beginners
R Programming 101 - Crash Course for beginners
Alejandro AO
4 Convert HTML template to WordPress Theme (2025) - Full Course
Convert HTML template to WordPress Theme (2025) - Full Course
Alejandro AO
5 Javascript Interactive Map with Leaflet EASY (with Marker Clusters & Popups)
Javascript Interactive Map with Leaflet EASY (with Marker Clusters & Popups)
Alejandro AO
6 Vanilla JS Project: Multi Step form in HTML, CSS & OOP Javascript
Vanilla JS Project: Multi Step form in HTML, CSS & OOP Javascript
Alejandro AO
7 How to do AJAX in WordPress correctly (2025)
How to do AJAX in WordPress correctly (2025)
Alejandro AO
8 React Leaflet Tutorial for Beginners (2025)
React Leaflet Tutorial for Beginners (2025)
Alejandro AO
9 Linear Regression in Python - Full Project for Beginners
Linear Regression in Python - Full Project for Beginners
Alejandro AO
10 Logistic Regression Project: Cancer Prediction with Python
Logistic Regression Project: Cancer Prediction with Python
Alejandro AO
11 Display Equations in ChatGPT
Display Equations in ChatGPT
Alejandro AO
12 Create a Chrome Extension (Manifest V3) for ChatGPT
Create a Chrome Extension (Manifest V3) for ChatGPT
Alejandro AO
13 Full-Stack Project | ChatGPT API, React, Node.js, Express
Full-Stack Project | ChatGPT API, React, Node.js, Express
Alejandro AO
14 Streamlit Python Course: Build a Machine Learning App to Predict Cancer
Streamlit Python Course: Build a Machine Learning App to Predict Cancer
Alejandro AO
15 Langchain PDF App (GUI) | Create a ChatGPT For Your PDF in Python
Langchain PDF App (GUI) | Create a ChatGPT For Your PDF in Python
Alejandro AO
16 LangChain Memory Tutorial | Building a ChatGPT Clone in Python
LangChain Memory Tutorial | Building a ChatGPT Clone in Python
Alejandro AO
17 Chat with a CSV | LangChain Agents Tutorial (Beginners)
Chat with a CSV | LangChain Agents Tutorial (Beginners)
Alejandro AO
18 Create a ChatGPT clone using Streamlit and LangChain
Create a ChatGPT clone using Streamlit and LangChain
Alejandro AO
19 Chat with Multiple PDFs | LangChain App Tutorial in Python (Free LLMs and Embeddings)
Chat with Multiple PDFs | LangChain App Tutorial in Python (Free LLMs and Embeddings)
Alejandro AO
20 Full Python Environment Setup for AI (or other) Apps + Virtual Environments
Full Python Environment Setup for AI (or other) Apps + Virtual Environments
Alejandro AO
21 Langchain + Qdrant Cloud | Pinecone FREE Alternative (20GB) | Tutorial
Langchain + Qdrant Cloud | Pinecone FREE Alternative (20GB) | Tutorial
Alejandro AO
22 LangChain Version 0.1 Explained | New Features & Changes
LangChain Version 0.1 Explained | New Features & Changes
Alejandro AO
23 Create a RAG Chain using LangChain 0.1 (New version)
Create a RAG Chain using LangChain 0.1 (New version)
Alejandro AO
24 Tutorial | Chat with any Website using Python and Langchain (LATEST VERSION)
Tutorial | Chat with any Website using Python and Langchain (LATEST VERSION)
Alejandro AO
25 Deploy Your AI Streamlit App for FREE | Step-by-Step (Heroku Alternative)
Deploy Your AI Streamlit App for FREE | Step-by-Step (Heroku Alternative)
Alejandro AO
26 What is Google's Gemini 1.5 Pro | 10 Million Token Window
What is Google's Gemini 1.5 Pro | 10 Million Token Window
Alejandro AO
27 Chat with MySQL Database with Python | LangChain Tutorial
Chat with MySQL Database with Python | LangChain Tutorial
Alejandro AO
28 Stream LLMs with LangChain + Streamlit | Tutorial
Stream LLMs with LangChain + Streamlit | Tutorial
Alejandro AO
29 Chat with MySQL Database using GPT-4 and Mistral AI | Python GUI App
Chat with MySQL Database using GPT-4 and Mistral AI | Python GUI App
Alejandro AO
30 #1 Harrison Chase: LangChain and The Future of LLM Applications | Alejandro AO
#1 Harrison Chase: LangChain and The Future of LLM Applications | Alejandro AO
Alejandro AO
31 CrewAI Step-by-Step | Complete Course for Beginners
CrewAI Step-by-Step | Complete Course for Beginners
Alejandro AO
32 Python: Automating a Marketing Team with AI Agents | Planning and Implementing CrewAI
Python: Automating a Marketing Team with AI Agents | Planning and Implementing CrewAI
Alejandro AO
33 Build a Web App (GUI) for your CrewAI Automation (Easy with Python)
Build a Web App (GUI) for your CrewAI Automation (Easy with Python)
Alejandro AO
34 Early days of RAG and LlamaIndex - Jerry Liu
Early days of RAG and LlamaIndex - Jerry Liu
Alejandro AO
35 LlamaParse: Convert PDF (with tables) to Markdown
LlamaParse: Convert PDF (with tables) to Markdown
Alejandro AO
36 #2 Jerry Liu - What is LlamaIndex, Agents & Advice for AI Engineers
#2 Jerry Liu - What is LlamaIndex, Agents & Advice for AI Engineers
Alejandro AO
37 CrewAI + Exa: Generate a Newsletter with Research Agents (Part 1)
CrewAI + Exa: Generate a Newsletter with Research Agents (Part 1)
Alejandro AO
38 #3 Joe Moura | Multi Agent Systems and CrewAI
#3 Joe Moura | Multi Agent Systems and CrewAI
Alejandro AO
39 Python: Create a ReAct Agent from Scratch
Python: Create a ReAct Agent from Scratch
Alejandro AO
40 New Groq Models: Best for Function-Calling Agents
New Groq Models: Best for Function-Calling Agents
Alejandro AO
41 Introduction to LlamaIndex with Python (2025)
Introduction to LlamaIndex with Python (2025)
Alejandro AO
42 LlamaIndex: How to use LLMs
LlamaIndex: How to use LLMs
Alejandro AO
43 LlamaIndex: How to Get Structured Data from LLMs
LlamaIndex: How to Get Structured Data from LLMs
Alejandro AO
44 Multimodal RAG: Chat with PDFs (Images & Tables) [2025]
Multimodal RAG: Chat with PDFs (Images & Tables) [2025]
Alejandro AO
45 Advanced RAG with LlamaIndex - Metadata Extraction [2025]
Advanced RAG with LlamaIndex - Metadata Extraction [2025]
Alejandro AO
46 Learn MCP Servers with Python (EASY)
Learn MCP Servers with Python (EASY)
Alejandro AO
47 Create MCP Clients in JavaScript - Tutorial
Create MCP Clients in JavaScript - Tutorial
Alejandro AO
48 Create an MCP Client in Python - FastAPI Tutorial
Create an MCP Client in Python - FastAPI Tutorial
Alejandro AO
49 How to Build an MCP Client GUI with Streamlit and FastAPI
How to Build an MCP Client GUI with Streamlit and FastAPI
Alejandro AO
50 Vibe Coding For Engineers (make it ACTUALLY work)
Vibe Coding For Engineers (make it ACTUALLY work)
Alejandro AO
51 LlamaExtract Tutorial: Convert PDF & Images into JSON
LlamaExtract Tutorial: Convert PDF & Images into JSON
Alejandro AO
52 Local MCP Servers for Cursor (Step by step)
Local MCP Servers for Cursor (Step by step)
Alejandro AO
53 Anthropic: How to Build Multi Agent Systems
Anthropic: How to Build Multi Agent Systems
Alejandro AO
54 Deploy Remote MCP Servers in Python (Step by Step)
Deploy Remote MCP Servers in Python (Step by Step)
Alejandro AO
55 GPT-5 for Developers: API Changes, Pricing, Model Router & Security
GPT-5 for Developers: API Changes, Pricing, Model Router & Security
Alejandro AO
56 Tutorial: Auth for Remote MCP Servers (Step by Step) | OAuth 2.1 with ScaleKit
Tutorial: Auth for Remote MCP Servers (Step by Step) | OAuth 2.1 with ScaleKit
Alejandro AO
Generate UI Tests with TestSprite MCP Server + TRAE
Generate UI Tests with TestSprite MCP Server + TRAE
Alejandro AO
58 #4 Allan Guo | 19-yo YC Founder - Willow Voice
#4 Allan Guo | 19-yo YC Founder - Willow Voice
Alejandro AO
59 RAG Project: Build an AI Onboarding Chatbot with Streamlit, LangChain, and ChromaDB
RAG Project: Build an AI Onboarding Chatbot with Streamlit, LangChain, and ChromaDB
Alejandro AO
60 MCP Security | Malicious MCP Servers (Protect Yourself)
MCP Security | Malicious MCP Servers (Protect Yourself)
Alejandro AO

This video teaches how to use TestSprite MCP Server and TRAE to generate UI tests for an app, covering the entire process from creating a PRD to stress-testing the application. By following this tutorial, viewers can learn how to automate UI testing with AI and improve their app development workflow. The video also covers how to integrate TRAE, TestSprite, and modern IDEs.

Key Takeaways
  1. Generate a PRD with TRAE
  2. Code an app in Next.js with in-memory authentication
  3. Set up TestSprite for AI-driven test automation
  4. Use an MCP server for secure local testing
  5. Run automated front-end testing with Playwright
  6. Read and act on AI-generated test reports
  7. Refine the app with test-driven feedback loops
💡 Using AI-driven test automation with TestSprite and TRAE can significantly improve the efficiency and effectiveness of UI testing for app development.

Related Reads

📰
SpaceX Owns Cursor: What It Means for AI Coding Tools
SpaceX acquires Cursor, a leading AI coding tool, for $60 billion, reshaping the AI developer platform landscape and putting Elon Musk at its center
Dev.to AI
📰
OrinIDE v1.0.8 is here and it's a whole vibe upgrade 🚀
Upgrade to OrinIDE v1.0.8 for enhanced AI-powered coding experience
Dev.to · Nandan Das
📰
The Rise of Loop Engineering — How AI Coding Agents Are Changing Development in 2026
Discover how AI coding agents are revolutionizing development in 2026 and learn to leverage them for improved productivity
Dev.to · SAR
📰
A Software Engineer’s Notes from a Generative AI Bootcamp
Learn how a software engineer applied generative AI concepts to their work after attending a bootcamp, and discover key takeaways for implementing AI in your own projects
Medium · Machine Learning

Chapters (7)

Intro
2:39 Generating the PRD with TRAE
6:18 Wrapping up initial build
6:31 LLM Errors
8:25 Running TestSprite
13:15 Debugging & validating results
14:35 Final checks & improvements
Up next
How to Create Presentations in Microsoft Cowork (Copilot) with Templafy MCP
Templafy
Watch →