Play it Right with CodeceptJS: An Introduction to Supercharged End-to-End Testing

Rate this content
Bookmark

CodeceptJS is BDD-style end-to-end testing framework which plays nicely with all popular testing engines. CodeceptJS has built-in support of PageObjects, DataObjects, plays nicely with TypeScript, and even has its own UI app! In this session, we will take a look how CodeceptJS can be paired with Playwright to make the testing simple and effective.

FAQ

Concept.js is a BDD-style testing framework that is focused on browser testing, offering easy integration with various browser engines like Playwright, WebDriver, and others. It simplifies test writing by using human-like language and supporting multiple browsers, making it a versatile choice for modern web development.

Concept.js can easily switch execution between different browser engines to accommodate the needs of various browsers, including Internet Explorer and Safari. This flexibility ensures tests can be run in any required environment without significant changes to the code.

Yes, Concept.js comes with built-in support for Cucumber BDD, allowing tests to be written in Gherkin language. This feature makes it possible to involve non-technical stakeholders in the testing process by using language that is easy to understand.

Concept.js integrates with several reporting tools including Allure and Report Portal. It offers built-in UI and graphical interactive test runners that provide detailed, step-by-step reports of test executions, catering to different organizational needs.

The interactive pause feature in Concept.js allows testers to pause test executions once a page is loaded. This enables them to manually interact with the page, experiment with different commands, and determine the next steps in real-time, enhancing the effectiveness of testing and debugging.

Concept.js is designed to adjust tests for execution on different environments, including mobile browsers. This capability ensures that applications function correctly across a variety of devices, meeting the demands of modern mobile users.

Switching browser engines in Concept.js is straightforward, typically requiring a simple change in the configuration file. This flexibility allows testers to choose the most suitable engine for their specific test scenarios without rewriting tests.

Concept.js employs several strategies to manage elements that load slowly, such as automatic retries for each testing step and explicit waits. These features help ensure reliability and stability in tests, even with complex, single-page applications.

Michael Bodnarchuk
Michael Bodnarchuk
28 min
15 Jun, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Concept.js is a BDD style testing framework focused on browser testing, offering easy switching between engines and Cucumber BDD support. The Pulse feature in Concept.js allows for interactive test execution and editing. Concept.js provides a user-friendly interface, reporting options, and supports parallel execution. CodeSap.js offers strategies for dealing with slow-loading elements and provides flexibility in browser control. Contributing to Concept.js is encouraged, and CodeSap.js is a good choice for advanced features and full browser control.

1. Introduction to Concept.js and Testomato

Short description:

Hello. I will introduce you to Concept.js, a supercharged end-to-end testing tool. I am Michael, a web developer and test automation engineer. I have experience with open-source testing frameworks and have developed Concept.js to solve testing problems. I also work on Testomato, a test management system for JavaScript tests.

Hello. I hope you enjoyed the conference, and I hope you learned a lot today. Lots of new tools, new approaches. You met wonderful people, and I'd like to jump on the train and introduce you to a new, very cool tool, Concept.js.

So I would call it supercharged end-to-end testing. Well, because I can, and because I really do enjoy testing with Concept.js. So my name is Michael, and I will introduce you into this tool and show you the problem it actually solves. So I am from Kiev, Ukraine. I am actually a web developer, but I also work as a test automation engineers to practice, to see how people, what problems people do have and going with automated testing. And that's how I take this experience to make it an open-source testing frameworks like, surprise, surprise, Concept.js.

So yes, I am lead developer of Concept.js as well, but also I like do testing with Concept.js. Well, I think it's fair enough to say this. I started my journey to open source testing frameworks with my previous project, Conception, which is very popular in PHP community. And Concept.js takes this experience and brings this to a new level and gets into JavaScript ecosystem. Nowadays, I'm working for my own company and we are building a test management system for automated test, Testomato. Testomato is focused on JavaScript tests, so if you have a total mess with your tests, Testomato can organize it for you. That's the idea.

2. The Era of Uncertainty and Choosing the Right Tool

Short description:

Do you remember the days when everything was stable and predictable, and Selenium was the only testing tool for browsers? Now, in the era of uncertainty, we have an ecosystem of tools like Cypress, WebDriver, Playwright, Cucumber, Jest, and Mocha. Choosing the right tool is challenging, especially when clients request specific features like writing tests in Gherkin or supporting Internet Explorer and Safari. We must be prepared to adapt our tests to different environments, including mobile browsers.

So I would start my talk with the question about do you remember that old good days when everything was pretty predictable, everything was stable, and I'm not talking about the things like that you could travel to all the places you want, you could talk to people you want to. I'm talking about just engineering stuff that previously we had only one tool. It was called Selenium, and we used it to test everything that is related to browser. If you need Selenium, you would probably choose Java. If you need, maybe you will need Python or Ruby, but you will choose Selenium. It's a certain decision. There was absolutely no alternatives on these days.

But today we live in the era of uncertainty. The JavaScript's found, and it created a wonderful ecosystem of different tools. And today choosing a right tool for the job is a tricky question, because we have Cypress, we have WebDriver, Playwright, Cucumber, Jest, Mocha. And well, how much of things you need to learn today to choose the right tool for the job. We definitely live in the era of uncertainty, and much more stress brings the questions I'm trying to list when I'm asking a client for new test automation project. because we can start writing tests, but then client came out and say, hey, I've learned about the BDD yesterday. It's so awesome. I want to write this test myself in Gherkin language. Can our tool write tests in Gherkin? Hmm, good question. Especially if we already have our tests not in Gherkin, but in JavaScript, can we easily introduce BDD level on top of it? Oh, the client came. I need Internet Explorer. You will hate me for this, but we need Internet Explorer because I have lots of enterprise clients. Can your tool easily switch to Enterprise Explorer on the fly when all the tests, especially with BDD on all the stuff we're already written? That's a good question. Hey, client comes again. I need Safari support. Well, Safari is fair enough. Safari is modern browser. Everyone uses it. And if our tool can do Safari or not, this also can be tricky for some kind of tools. But we need to be prepared for all those changes all this time. Can we adjust our tests to be executed on all those different environments? And especially for mobile browsers because the world goes mobile, and test it in mobile is also a hard requirement that client may not be fully aware of at the beginning of the journey but will be asking when you have some of tests and they will ask you, execute this test on mobile and this test. So mobile browser can be a new requirement as well. And against era of uncertainty, we don't know what a new tool will come up this year because every year, some good test automation tool emerges.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Testing Web Applications with Playwright
TestJS Summit 2022TestJS Summit 2022
20 min
Testing Web Applications with Playwright
Top Content
Testing is hard, testing takes time to learn and to write, and time is money. As developers we want to test. We know we should but we don't have time. So how can we get more developers to do testing? We can create better tools.Let me introduce you to Playwright - Reliable end-to-end cross browser testing for modern web apps, by Microsoft and fully open source. Playwright's codegen generates tests for you in JavaScript, TypeScript, Dot Net, Java or Python. Now you really have no excuses. It's time to play your tests wright.
Full-Circle Testing With Cypress
TestJS Summit 2022TestJS Summit 2022
27 min
Full-Circle Testing With Cypress
Top Content
Cypress has taken the world by storm by brining an easy to use tool for end to end testing. It’s capabilities have proven to be be useful for creating stable tests for frontend applications. But end to end testing is just a small part of testing efforts. What about your API? What about your components? Well, in my talk I would like to show you how we can start with end-to-end tests, go deeper with component testing and then move up to testing our API, circ
Everyone Can Easily Write Tests
TestJS Summit 2023TestJS Summit 2023
21 min
Everyone Can Easily Write Tests
Let’s take a look at how Playwright can help you get your end to end tests written with tools like Codegen that generate tests on user interaction. Let’s explore UI mode for a better developer experience and then go over some tips to make sure you don’t have flakey tests. Then let’s talk about how to get your tests up and running on CI, debugging on CI and scaling using shards.
Tiny Tests, Large Results
TestJS Summit 2022TestJS Summit 2022
21 min
Tiny Tests, Large Results
Yes, Big things do come in small packages. For example, isn’t a unit test’s speed, feedback, and reliability fantastic? Did you know we can also have fast, focused, and reliable feedback from our functional e2e tests? Atomic e2e tests are those that are targeted and focused. They’re tiny in size but large in their impact. This tutorial will teach you how to create atomic e2e tests with several code examples. First, we will use Cypress.io to authenticate by setting a cookie. Instead of using a UI. Second, we will use Cypress.io to set a JSON Web Token for authentication. Join me, and let’s write tiny tests for large results.
We May Not Need Component Testing
Vue.js Live 2024Vue.js Live 2024
26 min
We May Not Need Component Testing
Testings are mandatory and unit tests are the foundation for building a good testing system for our project. But for front end projects which involve components, how many unit tests are considered efficient and not overkill? Should we use additional libraries like Testing Library or Vue Test Utils with Vitest to test a component, when we can perform the same with just Playwright? Whether a component test using an E2E framework like Playwright is really a kill for? Let's find out in my talk.
Testing Mail Service With Playwright
TestJS Summit 2022TestJS Summit 2022
17 min
Testing Mail Service With Playwright
Top Content
We send emails to our users - account verification and newsletters. We allow the user to contact us by sending an email via inbuild form. Do we? Does the user receive an account verification email or exactly what notification they signed up for? We can cover this functionality as part of E2E tests: get an email and open it to check what is in it. We will need Playwright and a fake SMTP server to capture emails sent by the app.

Workshops on related topic

Detox 101: How to write stable end-to-end tests for your React Native application
React Summit 2022React Summit 2022
117 min
Detox 101: How to write stable end-to-end tests for your React Native application
Top Content
WorkshopFree
Yevheniia Hlovatska
Yevheniia Hlovatska
Compared to unit testing, end-to-end testing aims to interact with your application just like a real user. And as we all know it can be pretty challenging. Especially when we talk about Mobile applications.
Tests rely on many conditions and are considered to be slow and flaky. On the other hand - end-to-end tests can give the greatest confidence that your app is working. And if done right - can become an amazing tool for boosting developer velocity.
Detox is a gray-box end-to-end testing framework for mobile apps. Developed by Wix to solve the problem of slowness and flakiness and used by React Native itself as its E2E testing tool.
Join me on this workshop to learn how to make your mobile end-to-end tests with Detox rock.
Prerequisites- iOS/Android: MacOS Catalina or newer- Android only: Linux- Install before the workshop
Testing Web Applications Using Cypress
TestJS Summit - January, 2021TestJS Summit - January, 2021
173 min
Testing Web Applications Using Cypress
WorkshopFree
Gleb Bahmutov
Gleb Bahmutov
This workshop will teach you the basics of writing useful end-to-end tests using Cypress Test Runner.
We will cover writing tests, covering every application feature, structuring tests, intercepting network requests, and setting up the backend data.
Anyone who knows JavaScript programming language and has NPM installed would be able to follow along.
Building out a meaningful test suite that's not all E2E
TestJS Summit 2023TestJS Summit 2023
89 min
Building out a meaningful test suite that's not all E2E
Workshop
David Burns
David Burns
We're all taught to follow the Testing Pyramid but the reality is that we build out the Testing Christmas Tree. In this workshop, David will talk you through how to break down projects and put the tests where they need to be. By the end of the workshop you will be able to update your projects so that anyone and everyone can start contributing and truly living up to "Quality is everyone job".
He will walk you through:- Component Testing- API Testing- Visual Regression Testing- A11Y testing
He will also talk you through how to get these all setup in your CI/CD pipeline so that you can get shorter and faster feedback loops.
Live e2e test debugging for a distributed serverless application
TestJS Summit 2021TestJS Summit 2021
146 min
Live e2e test debugging for a distributed serverless application
WorkshopFree
Serkan Ozal
Oguzhan Ozdemir
2 authors
In this workshop, we will be building a testing environment for a pre-built application, then we will write and automate end-to-end tests for our serverless application. And in the final step, we will demonstrate how easy it is to understand the root cause of an erroneous test using distributed testing and how to debug it in our CI/CD pipeline with Thundra Foresight.

Table of contents:
- How to set up and test your cloud infrastructure
- How to write and automate end-to-end tests for your serverless workloads
- How to debug, trace, and troubleshot test failures with Thundra Foresight in your CI/CD pipelines
Uniform Browser Automation Infrastructure
TestJS Summit - January, 2021TestJS Summit - January, 2021
127 min
Uniform Browser Automation Infrastructure
Workshop
Ivan Krutov
Ivan Krutov
In this workshop, I will show you how to quickly deploy and use browser automation infrastructure with Moon solution. We will start deploying everything on your workstation and will soon be able to run Selenium, Playwright and Puppeteer tests in parallel in the same cluster. Then I will demonstrate how to easily deliver the same experience for your team using a remote cluster in the cloud platform.