TestEz Setup Help!

Main Question:
Hello, I’m getting started with TestEZ but I have no idea how to install it. I looked at the documentation but I’m still confused on what you will do after you copied your src.

Visuals (pictures, videos, etc) would be helpful or just a step by step process to do it.

1 Like

Usually, you would create .spec.lua files right next to the files that you want to test.
You don’t really need to copy your src folder, just create a client or server script that runs tests on the path

1 Like

There is a TestEz documentation.

1 Like

TestEZ documentation. Check here for installation and usage steps, it’s pretty well documented. I would assume you’ve seen this though since you got to the src part. Just have a little comb through the running, writing and debugging tests sections.

On another note, it seems like you can skip the process of directly copying the src folder into your repository and not sure why that isn’t a third method. It involves .gitmodules. The most common way for Roblox repositories seems to be a module folder for that.

  1. Create a blank folder in your repository called modules.
  2. Create a blank folder in the previous folder and call it TestEZ.
  3. Create a .gitmodules file in the top-level of your directory.
  4. Add TestEZ to the gitmodules file.
[submodule "modules/testez"]
	path = modules/testez
	url = https://github.com/Roblox/testez.git
1 Like

Slightly irrelevant, but since nobody has mentioned this here before, I would recommend using the TestEZ Companion for running tests once you are all setup with TestEZ. This will allow you to be able directly run tests in Visual Studio Code, if you use Visual Studio Code without having the hassle to tinker with TestService in studio. It’s straightforward and runs exactly how you would expect it to.

1 Like

I know it’s been a few years but I’d like to add that you can add support for TestEZ to Lua LSP in rojo by adding this file to your repository and configuring .vscode/settings.json

file

.vscode/settings.json

{
    "luau-lsp.sourcemap.rojoProjectFile": "default.project.json",
    "luau-lsp.types.definitionFiles": [
        "testez.d.lua"
    ]
}

To add selene support, follow the instructions on this page.
page

1 Like