Install the package
Add a yaml file to your project called codebeaver.yaml
. This tells CodeBeaver what to test and how.
e2e:
login-test: # Name of the test. You can add more
url: "localhost:3000" # Starting URL of your app. It can be a local server or a remote server
steps:
- Login with Github
- Go to the team page
- Change the team name to "e2e"
- Click on the "Save" button
- Check that the team name is "e2e" # use words like "Check that" to assert the results of the test
unit:
from: pytest # The Unit testing framework you want to use
Thatβs it. To run it, you need to have an OpenAI API key and Chrome installed.
export OPENAI_API_KEY="your-openai-api-key"
codebeaver
You will get a summary report like the following:
π₯οΈ 1/1 E2E tests
login-test: Success!
π§ͺ 14/15 Unit tests
π 1 test added and 1 test updated to reflect recent changes.
π Found 1 bug