openfga / openfga/vscode-ext

Allow running tests through the CLI and display the output

Open
#302 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
22
Forks
7
Avg merge
1d 12h
Merged PRs (30d)
14

Description

We want to allow developers to run their store based tests from within the extension, there are a few ways we can approach this and they are mostly building on top of each other to get to the best experience we can provide, however the latter stages do require changes to the CLI to facilitate this integration.

Command Palette

We introduce a new command that developers can run via the Command Palette (similar to our existing transform command), this command could either:

This should be the first pass at this feature that allows us to gather feedback and see how developers use the feature.

Test Explorer Integration

In future, we could look to add integration with the Testing API that would allow developers to run their tests from the the Test Explorer view. This would require:

  • Updating the extension to declare we contribute this feature
  • Handle creating the test representations in VS Code when we parse the store file
  • Amending the above feature to run the tests as required and reporting back the failures/successes

It would also most likely require the following from the CLI:

  • A better "machine readable" output format for testing so that we don't have to rely on regex's
  • Ability to run single tests

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the existing transform command in the VS Code extension and the fga model test CLI command. The first pass should add a Command Palette command that runs the tests and exposes their output through a terminal or output channel. Test Explorer integration and machine-readable CLI output are future stages rather than part of the initial completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
cli, devtools, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.