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.

This talk has been presented at TestJS Summit - January, 2021, check out the latest edition of this JavaScript Conference.

FAQ

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.

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.

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
Watch video: Testing Web Applications with Playwright
Testing web applications with Playwright, a reliable end-to-end testing tool. Playwright offers fast execution, powerful tooling, and support for multiple languages. It provides precise selectors, web-first assertions, and code generation for easy testing. Playwright also offers features like live debugging, tracing, and running tests on CI. The future of Playwright aims to make testing easy and fun, with a focus on creating frustration-free web experiences.
Full-Circle Testing With Cypress
TestJS Summit 2022TestJS Summit 2022
27 min
Full-Circle Testing With Cypress
Top Content
Cypress is a powerful tool for end-to-end testing and API testing. It provides instant feedback on test errors and allows tests to be run inside the browser. Cypress enables testing at both the application and network layers, making it easier to reach different edge cases. With features like AppActions and component testing, Cypress allows for comprehensive testing of individual components and the entire application. Join the workshops to learn more about full circle testing with Cypress.
Everyone Can Easily Write Tests
TestJS Summit 2023TestJS Summit 2023
21 min
Everyone Can Easily Write Tests
Playwright is a reliable end-to-end testing tool for modern web apps that provides one API, full isolation, fast execution, and supports multiple languages. It offers features like auto-weighting, retrying assertions, seamless testing of iframes and shadow DOM, test isolation, parallelism, and scalability. Playwright provides tools like VS Code extension, UiMode, and Trace Viewer for writing, debugging, and running tests. Effective tests prioritize user-facing attributes, use playwright locators and assertions, and avoid testing third-party dependencies. Playwright simplifies testing by generating tests, providing code generation and UI mode, and allows for easy running and debugging of tests. It helps in fixing failed tests and analyzing DOM changes, fixing locator mismatches, and scaling tests. Playwright is open source, free, and continuously growing.
Tiny Tests, Large Results
TestJS Summit 2022TestJS Summit 2022
21 min
Tiny Tests, Large Results
Automated atomic tests are a great way to improve UI tests by making them less brittle and faster. The tests focus on testing a single feature or component and have minimal UI interactions. The Talk explores examples of automated atomic tests and their implementation on web applications. It also discusses the analysis of atomic tests, login tests, and working with JSON Web Tokens for authentication and authorization. The Talk concludes by highlighting the use of UI and web requests in automated atomic testing.
We May Not Need Component Testing
Vue.js Live 2024Vue.js Live 2024
26 min
We May Not Need Component Testing
Component testing is a gray area between integration and unit testing. The demo app focuses on the cart component and writing test cases for Playwright component test and VTest. The first cart test encounters a bug with the invisible method in View Test.
Testing Mail Service With Playwright
TestJS Summit 2022TestJS Summit 2022
17 min
Testing Mail Service With Playwright
Top Content
Watch video: Testing Mail Service With Playwright
This Talk discusses how to test mail service with Playwright, covering e-mail verification, reset password user journey, and more. It explores the use of third-party providers for reliable e-mail delivery and demonstrates how Playwright can help perform checks on e-mail content. The Talk also introduces the concept of a fake SMTP server and showcases how fixtures can be used to access the SMTP server and perform assertions on the HTML body of emails. Playwright's HTML rendering feature allows for interaction with email content as if it were a regular web page. It highlights the ability to render HTML from API calls, perform assertions on the rendered page, and exclude dynamically generated data from visual regression tests.

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.