Giter Site home page Giter Site logo

crusher-dev / crusher Goto Github PK

View Code? Open in Web Editor NEW
514.0 10.0 31.0 109.59 MB

πŸ§™β€β™€οΈ Fast low-code testing β€” create, run tests and get alerts ⏱️ Create test in <60 secs πŸ‘‰ Better open source alternative to selenium, cypress and puppeteer

Home Page: https://crusher.dev

License: MIT License

TypeScript 85.28% JavaScript 7.97% Dockerfile 0.24% Shell 0.14% EJS 5.27% HTML 0.81% MDX 0.29%
javascript test testing nodejs react selenium typescript playwright cypress low-code

crusher's People

Contributors

anmolm96 avatar arpitbhalla avatar arpitgoyalgg avatar hardikhere avatar himanshu-dixit avatar utkarsh-dixit avatar vireshuberoy 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  avatar  avatar  avatar  avatar  avatar  avatar

crusher's Issues

`Setting up` proxy screen not shown when using "Save test" instead of "Verify & Save"

Steps to reproduce

  • Ensure proxy config is not setup in <project_dir>/.crusher/crusher.json
  • Create a test for local url (e.g http://localhost:3000)
  • Click on "Save test" under dropdown

What do you see?
No proxy screen is shown, to warn user that proxy is not setup and the test may result in failure.

Expected result
Proxy warning screen is shown, and can be of help to user in setting up proxy.

Restructure internal packages

For better mind mapping.

  • Move code generator & runner utils to code generator. This looks like better name IMO.
  • Move unique selector to electron-app.
  • Move video processor to test-runner under worker.

Crusher's roadmap

This is the short term plan of Crusher.

Goal:- Make fastest web testing experience for developers.

Focus on- Stability, integration, speed.

High level components involved: Tooling, Local Recorder, App(Frontend & Backend), Freamwork, Test runner, Misc (Docs & Workers).


Current status: We've built a better testing framework. There's still lot of be done.

Core

  • "Rerun build" should use the same config and host as the original build.

Tooling

CLI

  • #243
  • Add support for sharing and running test in isolation.
  • #235
  • Add --commit-id flag in test:run command for CI integration

Features

  • Support component testing
  • Add configuration support
  • Test management support

Devex

  • Integrate crusher with Vitest or vitejs. Allow component and e2e run in instantly.
  • Create plugin for bundling system to add identifier directly from crusher. For vite, webpack, etc.
  • Create plugin to use component name while testing.

App

  • Improve logs in build report
  • Show network requests between steps in build report
  • Add option to create test for common template such as SEO checks, performance, broken links, etc.

Test runner & SDK

  • Add support to find an element using document.querySelector, getElementById, etc.
  • Auto-refresh for argo-tunnel in test-runner.
  • Add option to cache request to test based on historical reponse. Use hashing.
  • Fail navigation steps if critical error like (SSL validation, no response, etc)

Misc

  • Add long polling or websockets in recorder to decrease response time and total requests.

Optimize contribution

These will be delightful, current dev setup is still good with dev reload <3 seconds.

  • Upgrade to next 12.
  • Use HMR in crusher electron app/upgrade to vite.
  • Find a way to use vite with server.

Option to view dom, console, network of page object

What is the problem this feature will solve?

Better debugging while creating/updating test

Currently

  • On right click, inspect element opens up
  • On top menu > window > developer tools. Debugging mode of window opens up.

What is the feature you are proposing to solve the problem?

TBD

What alternatives have you considered?

No response

Framework to stress test different scenarios

Describe the issue
Currently, we're on goal to make recording and playback of test very easy. As we develop things, there's good chance that we will introducing breaking changes.

The goals of this stress testing will be to
1.) Run test via simulating user action on our recorder. Simulated for differeny website. E.g- Facebook, etc.
2.) Check the generated output of steps.
3.) Try to run test for the same.
4.) Generate a table with list of steps and output.
5.) Pass PR/commit message on the basis of it.

Resources
xdotool http://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html

Use only one request to save/update tests

Earlier, we used to allow saving/updating tests without asking the user to login from the recorder. The legacy flow use to look like this,

  1. Saving/Updating test will create a temporary record in backend through /save.temp API.
  2. User would be redirection app.crusher.dev/tests page and once user is Authorised it will create/update the test.

With the new v1.0.5 release, the user is asked to login/connect to cloud account so the legacy workflow is no longer needed. We now only need to call one API, instead of two

Upgrade telemetry logging & system logging

Crusher uses anonymised tracking and logging in axiom.

Logging can be made better with few changes:-
Screenshot 2022-08-09 at 7 46 31 PM

  • Attach argument variable in logs
  • Add user info when test run on cloud service
  • Add machineId when test are run locally with system info

πŸ“— Contributing to crusher should be easy

Crusher is made of many packages that work in tandem. It can be exhausting to contribute.

Few ideas on how to make contributing easy, I think this should be discussed more with @utkarsh-dixit further.

  • Describe high-level overall structure about idea of codebase.

  • Build common easy APIs that makes easier to contribute.

  • Keep packages abstracted in silos.

  • Simplify single package contribution without needing to run other packages.

    • Frontend
    • Backend
    • Test runner
    • Common Utils
  • Make it easy to run test on remote environment.

Show error screen when requests to backend are failing

Steps to reproduce

  1. Open recorder and goto settings
  2. Set backend and frontend url to incorrect values
  3. Click Save

What do you see?
Infinite loading screen, without any error screen or infromation.
image

Expected result
Error screen describing what went wrong.

Log files are being created in working directory

Steps to reproduce

  1. Run npx crusher-debug in any directory

What do you see?
Two files are created in that directory, combined.log and error.log

Expected result
No file should be saved in working directory

Storybook not working in dyson

The dyson via storybook was not used directly for a while.

How to reproduce?
1.) Go to packages/dyson
2.) Run pnpm run storybook and pnpm run build-storybook

Desired outcome

  • Able to use storybook as component doc.
  • Host component doc somewhere

Fix CLI p0/p1 errors

  • When crusher-cli is run. Don't show electron app with prompt to run command. p0 issue
  • Throw errors when there is issue with config.
  • Show relevant message all along the way. While creating or selecting a project automatically.
  • Don't allow access to run other project.

Remove cli-ux from cli

Affected URL(s)

No response

Description of the problem

Replace cli.log, cli.progres, cli.info, cli.info, etc. It's a commonJS module which can't be treeshaked.

Implement Forget password

Describe the feature
A user with account, should be able to reset their password. Here's how it would work.

1.) Send link to email to reset password.
2.) User clicks on the link.
3.) Enter the new password.

Add support for running test with only CLI

Describe the feature
Currently, crusher is aimed at solving web testing e2e. A CLI integration to run test without any framework can be quite helpful.
The test can be part of code and can be run without need of hefty infra (Good for individual users).

What's expected behaviour
1.) Use Crusher test recorder. Save BJSON file.
2.) Save BJSON for each test in repo. Run test.
3.) Save output in dir. Create basic javascript app to display result. Server it through server package
OR
Upload bjson to crusher. Limitation images/etc.

Features that'll be hard to add
1.) Multi browser testing.
2.) Screenshot comparison. Basic can be added.

Advantage
1.)More people will be able to use crusher.
2.) App without tunnelling support can be tested.

Mongo DB credentails are mixing up in wrong manner

Describe the issue

Our mongo config is defined as

        "MONGODB_HOST": "localhost",
        "MONGODB_PORT": "27017",
        "MONGODB_USERNAME": "admin",
        "MONGODB_PASSWORD": ""

Where as admin is DB created and there's no user/password authentication.

Screenshot 2020-11-16 at 12 28 08 PM

What's expected behaviour
DB name should be crusher with some username and password combination.

Who should solve this
Utkarsh

Describe priority
Low

For refernece, format https://docs.mongodb.com/manual/reference/connection-string/#components

Expose playwright function to webview-recorder script

As of now we are making use of console.log for communication to main process, by intercepting all the console messages and using first argument to console as identifier. The problem with this approach is:-

  • All console messages needs to be intercepted and processed, which can block the main process.
  • It's spamming the console logs for debugging session

Solution
Expose a binding (eg. crusherSdk) using browserContext.exposeBinding and use it for communication to main process.

Cleanup backend apis to http status code properly

Quick look table for http methods:

HTTP Verb CRUD Entire Collection (e.g. /customers) Specific Item (e.g. /customers/{id})
POST Create 201 (Created), 'Location' header with link to /customers/{id} containing new ID. 404 (Not Found), 409 (Conflict) if resource already exists..
GET Read 200 (OK), list of customers. Use pagination, sorting and filtering to navigate big lists. 200 (OK), single customer. 404 (Not Found), if ID not found or invalid.
PUT Update/Replace 405 (Method Not Allowed), unless you want to update/replace every resource in the entire collection. 200 (OK) or 204 (No Content). 404 (Not Found), if ID not found or invalid.
PATCH Update/Modify 405 (Method Not Allowed), unless you want to modify the collection itself. 200 (OK) or 204 (No Content). 404 (Not Found), if ID not found or invalid.
DELETE Delete 405 (Method Not Allowed), unless you want to delete the whole collectionβ€”not often desirable. 200 (OK). 404 (Not Found), if ID not found or invalid.

For more information about POST, GET, PUT, PATCH, DELETE https methods, click here

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.