GuardianUI: Scaling E2E Test Creation with AI

Lipman
GuardianUI
Published in
5 min readJan 12, 2023

There’s been tons of hype in recent weeks about advancements in artificial intelligence, what it means for the business world, and what it could mean for everyday life in general. If history is any predictor of future events, we’re probably in the front wave of an ‘AI bubble’ the same way we just popped the bubble in crypto and growth tech.

I recently had a call with another founder whose GP told them they need to find a way to “somehow” incorporate AI into their product so they can take advantage of the upcoming AI cycle. I have a feeling we’ll start to see more companies slap on the AI sticker as investor window dressing.

However, there are REAL use cases for AI to provide step-change improvements to legacy processes. It’s in this vein that we started thinking a few months ago about how GuardianUI could leverage AI to create a better user experience and exponentially scale our business.

GuardianUI (Core) Overview

GuardianUI is an end-to-end testing and monitoring solution for web3 applications. We make sure what your users see on your app is actually what’s happening at the smart contract level. If we detect there’s an issue, we immediately send alerts to your engineering team with exactly what’s wrong so you can address it without guesswork.

GuardianUI testing framework being used on Uniswap

In v1, one of GuardianUI’s main use cases is to catch “man in the middle’’ attacks such as what happened to Curve and BadgerDAO. It’s a solution to a real problem and a largely ignored risk vector in web3.

But the solution comes with its own potential problem.

Developers Don’t Traditionally Test

End-to-end tests check the functionality of a system by simulating real-world scenarios and interactions between different components. Developers traditionally do not write end-to-end tests because they can be time-consuming and difficult to maintain.

Some reasons for this include:

  • Complexity: End-to-end tests can be complex because they need to simulate real-world scenarios and interactions between different components. This can make tests difficult to write and maintain.
  • Time-consuming: The general rule is for every 1 hour of development, you should perform 1 hour writing tests to maintain high test coverage. This can slow down the development process, and for many, writing tests isn’t as fun as shipping new features.
  • Fragility: End-to-end tests can be fragile and prone to breaking, as they are dependent on the behavior of many different components such as CSS styling, third party component library dependencies and many other factors that make it hard to reliably pinpoint in a programmatic way the location of a component in the HTML DOM tree. This can make it difficult to keep the tests up to date and maintain high test coverage.
  • Cost: End-to-end tests can be expensive to write and maintain, as they require a significant investment of time and resources.

However, without end-to-end testing you’re unable to continuously simulate true real-world behavior of your app and detect when things break or don’t work as expected.

Will Devs Write E2E Tests for GuardianUI?

For web2 interactions, the stakes arguably aren’t as high if things break. Maybe there’s an issue and a user can’t create a new account, which leads to them getting frustrated and never trying your app again. That’s bad for business, but that’s pretty much where it ends.

The stakes are much higher in web3.

If your UI doesn’t match what’s happening at the smart contract level, then your users may get rugged without even knowing it (e.g. giving the wrong address access to their funds). Equally as bad, you and your team may not know it either.

We jokingly call the space between the frontend and the smart contracts the “blackbox.” For most users, signing/approving a transaction with their wallet is a ‘click and pray’ moment. You hope after you open the box and the transaction is approved that it’s roses and rainbows, not Gwyneth Paltrow’s head.

The ramifications for not testing and continuously monitoring your live app are much greater in web3 for both your user and you. As we’ve said, security is lindy. When hacks occur or funds get lost/stolen, trust for your project gets drained along with it. It may also create legal issues for web3 teams.

The growth of GuardianUI depends on a) demand for our service, and b) tests being created somehow. It’s kind of hard to check if a test works if the test doesn’t exist!

We’re *hoping* the gravity and need for web3 testing and what we’re doing to make it as easy as possible for developers leads them to writing their own tests. (We’re also offering the option for GuardianUI to write tests for teams if they’d prefer to outsource that work.)

However, as they say, Hope is not a strategy.

Guardian”AI”

What if you could write an e2e test by simply typing the following prompt in plain english into GuardianUI’s testing system the way that user guides are usually written?

User Story: “How to swap 1 ETH to DAI on uniswap.org”

Steps:

  1. Connect your wallet.
  2. Select the ‘Select a token’ icon.
  3. Click on the DAI icon.
  4. Select the text field left of ETH logo.
  5. Enter 1.
  6. Click Swap.
  7. Approve the transaction request in your wallet.

Anybody in the organization or community could create that test instantly so long as they had the right instruction on how to use the prompts. No coding required. Doesn’t matter if you’re in marketing, finance, biz dev, community, etc. — you can now write tests quickly and easily.

And there’s no need to tie up technical resources to create tests in that scenario other than a QA spot check to make sure the test is accurate. Engineering teams get to have their cake and eat it too: high test coverage and continuous monitoring with GuardianUI.

This is one of the critical ways GuardianUI can scale exponentially and make good on our mission by supporting the long-term health and adoption of blockchain technology by providing scalable security infrastructure.

What’s Next

The GuardianUI beta (non AI) will begin mid February. More information about the beta and who is participating will come closer to that time. If you’re interested in joining the beta, please fill out this waitlist form.

If you geek out on AI engineering, take a look at our public UI RefExp model training notebook and join our community discord if you’d like to help us move faster together.

Follow us on twitter to stay up to date with our progress!

About GuardianUI

GuardianUI is the testing and monitoring platform for web3 frontends. Our SaaS platform integrates and automates end-to-end testing, application performance monitoring for web3 critical paths, and real-time alerting and observability to ensure deployed applications create the expected smart contract interactions for users.

https://www.guardianui.com/

--

--