checkly / public-roadmap

Checkly public roadmap. All planned features, updates and tweaks.
https://checklyhq.com
37 stars 7 forks source link

Support CodeceptJS syntax #116

Open DavertMik opened 3 years ago

DavertMik commented 3 years ago

Writing browser scripts in raw Playwright / Puppeteer has lots of pitfalls:

I'd like to introduce CodeceptJS https://codecept.io which should play very nicely with a service like Checkly!

Consider this basic example from checkly

const assert = require("chai").assert;
const puppeteer = require("puppeteer");

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto("https://google.com/");
const title = await page.title();

assert.equal(title, "Google");
await browser.close();

In CodeceptJS it would be written as

I.amOnPage('https://google.com')
I.seeInTitle('Google')

CodeceptJS will execute this code either in Playwright or in Puppeteer. The running engine can be switched in a config.

Here is a bit more complicated check scenario:

I.amOnPage('https://myapp.com/login');
I.fillField('Email', 'name@myapp.com');
I.fillField('Password', '123456');
I.click('Submit')
I.see('You are logged in!')

As you see it is as small as it is possible. In pure Playwright it requires is 11 lines of code and good knowledge of their API and assertion libraries.

as you see, the syntax looks perfect for such checks. CodeceptJS is used in various small & big companies and works since 2015. If you need assistance in integrating it - write me on Twitter @davert to help, or join CodeceptJS Slack.

I really like Checkly and I think CodeceptJS with Checkly should be a perfect match :heart:

tnolet commented 3 years ago

@DavertMik thank for requesting this. We don't have this on our roadmap (yet) but I'd be happy to leave this open and see if people will respond to this.