collective / collective.recipe.vscode

Buildout Recipe for Visual Studio Code
8 stars 8 forks source link

Add option robot-enabled (default *false*) to support robotframework-lsp #23

Closed datakurre closed 1 year ago

datakurre commented 1 year ago

What would it require to include this in the recipe?

From README:

robot-enabled
    Required: No

    Default: False

    Generate setting `robot.python.env` with buildout eggs for Robot Framework Language Server.
    Generate task **Start Plone Test Server** into `tasks.json`.
    Generate task **Robot Framework: Launch Template** into `launch.json` for Robot Framework Language Server.

How to try this out:

https://github.com/plone/buildout.coredev/commit/ac93a4569a3800dd2df52ae7df3321aefa8f0b99

  1. robotframework == 6.0.2 (or < 6.1) must be installed directly into virtualenv (robotframework-lsp supports robotframework 6.1 only by 1.11.0; see below)
  2. robotframework-lsp version 1.10.2 must be installed into VSCode (1.11.0 has a blocking issue https://github.com/robocorp/robotframework-lsp/issues/947)
  3. add robot-enabled = true for this recipe configuration and run buildout

Now VSCode should be able to provide highlighting and code navigation for robot tests.

To run and debug Robot tests directly from VSCode:

  1. Start VSCode task Start Plone Test Server (configured by this recipe change) and type the full Python path for you Plone Robot test fixture (e.g. plone.app.discussion.testing.PLONE_APP_DISCUSSION_ROBOT_TESTING)
  2. Have fun by executing Robot tests directly from VSCode.

Right now this hardcodes port 55001 for Plone Test Server and 49999 for Plone Test Server listener for setting up and tearing down test fixtures.

nazrulworld commented 1 year ago

Thanks a lot @datakurre . I will do a release as soon as possible.

mauritsvanrees commented 1 year ago

Could we have a release of this please?

Or could you invite the collective PyPI user as owner?

nazrulworld commented 1 year ago

@mauritsvanrees I think there is a new release already (associated with this PR). And also I have sent an invitation for this user https://pypi.org/user/collective/

mauritsvanrees commented 1 year ago

Thanks!