starknet-remix-plugin icon indicating copy to clipboard operation
starknet-remix-plugin copied to clipboard

Feature: Test contracts using Scarb or Foundry

Open JorikSchellekens opened this issue 1 year ago • 9 comments

Feature Request Summary

It would be amazing to be able to test the cairo contracts directly in the IDE. Currently, testing is only feasible via two strategies:

  1. Download all the files locally and write the tests in your favourite tool
  2. Deloy the files to testnet and play with it manually / write scripts to interact with these testnet instances

Detailed Description

Both Scarb and Foundry have testing integrations with slightly different styles. We should support at least Foundry's implementation of this in the IDE itself.


UI Integration

Sketch or Mockup: [Link to an image or diagram if possible]

A whole panel should be dedicated to testing, similar to how it's done in VS Code. The output of tests should probably be piped to the terminal provided.


Backend Implementation

For now, I assume we'll need to run all the testing on the backend, this requires more api's which simply pipe the response of the remote execution to the browser. In the long term the wasm'd version of foundry should support this out of the box.


Desired Behavior


Examples from Other Projects


Additional Information


Note: Thanks for taking the time to fill out this feature request. Our team will review it and provide feedback or ask further questions if needed. Your input helps us make our browser-based IDE better for everyone!


JorikSchellekens avatar Oct 18 '23 12:10 JorikSchellekens