Giter VIP home page Giter VIP logo

roboportal / dakka Goto Github PK

View Code? Open in Web Editor NEW
106.0 4.0 4.0 3.11 MB

Dakka - generate automation tests for Cypress, Playwright and Puppeteer

Home Page: https://www.dakka.dev/

License: Apache License 2.0

TypeScript 91.05% HTML 0.36% JavaScript 8.22% Shell 0.02% EJS 0.35%
test-automation testing-tools e2e-testing e2e-tests javascript-tests testing test-generation cypress cypress-io puppeteer

dakka's Introduction

Dakka

Unit Integration

Dakka logo

Generate tests for Cypress, Playwright and Puppeteer using Dakka

What's Dakka?

Dakka is an open source Chrome Extension which helps to generate end-to-end tests for Cypress, Playwright and Puppeteer.

Demo

Demo website link: https://roboportal.io/

Demo

Installing

To install Dakka click Chrome extension and this will take you to Chrome Web Store. Follow next steps to start generating tests:

  1. Open Chrome devtools
  2. Enable Dakka
  3. Click Record button
  4. Start interacting with the page

Dakka demo

User Actions

Once user starts recording, Dakka will catch:

  • Mouse clicks, double-clicks and right button clicks
  • Keyboard inputs including meta and special keys
  • File uploads
  • Browser navigation
  • Screen resize

Not only Dakka tracks events for the page, but also for all its iframes (all origins supported!).

Adding Assertions

Assertion Blocks are validation steps, which are converted to assertion logic such as cy.get('#loading').should('not.exist'). To add an assertion hover over the floating plus sign and drag and drop assertion block.

Adding Assertions

After adding Assertion Block you will need to configure assertion logic - locate the element on the page or manually add the element selector, choose the assertion from dropdown and edit the value if needed.


assertion setup 1 assertion setup 2

Choosing Selectors

Dakka suggests the list of best possible selectors for the elements on the page.

Choosing Selectors

Selectors are sorted by priority with green, red and yellow icons. First selector is pre-selected by default. Hover over the icon to get the element count on the page by selector.

Delete Events

If generated events contain any entries that aren't required for the test use the Delete button located at the bottom of the event block.

Exporting

Generated test can be copied to clipboard or downloaded as a file and added to the project.

Exporting

Alternatively, you can open the generated test in the extension's popup by clicking the action icon:

Test Preview

Test Case Creation

Dakka allows not only the single test recording and creation, but also the comprehensive test cases setup:

Test Case Creation

Contributing

Content

  • projects/extension/src/background - service-worker
  • projects/extension/src/devTools - creating tab for dev panel
  • projects/extension/src/contentScript - content and injectable scripts. Content has access to inspected DOM page, but is executed in different global context. Injectable is embedded to the document to intercept events.
  • projects/extension/src/panel - dev tool UI app
  • projects/extension/src/manifest.json - extension manifest
  • projects/test/integration - integration tests for projects
  • projects/test/playground - test playground with pre-configured tools

Development

Run npm i and npm start to start development. It will run webpack dev server on the 8080 port. To get the test page run npm run serve:integration and use: http://localhost:8081

Testing

Run npm test to execute the test suite. To update mocks of generated tests execute UPDATE_OUT=true npm run test

Build details

There are two webpack configs to bundle the extension:

  • webpack.panel.config.js - builds devTool and panel pages. This config supports HMR.
  • webpack.scripts.config.js- builds background, content and injection scripts. This part doesn't use HMR cause it leads to the behaviour when the panel app stops receiving chrome.runtime messages from content and background scripts.

It's noticed, that when multiple webpack processes work concurrently, it might cause a stale dev-server port after stopping the processes. To clean up such a process use kill:stale-dev-server.

Using remote devtools

To use React and Redux devtools, start the servers first: npm run devtools. In redux-devtools panel open Settings and select use local option in the Connection tab. The hostname should be localhost, and the port should be 8000.

Building for production

Run to create production build: npm run build and npm run pack to compress it as zip file.

dakka's People

Contributors

dependabot[bot] avatar dnshko avatar etun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dakka's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.