Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be able to run with multiple env configurations #289

Closed
sswaroopgupta opened this issue Aug 20, 2018 · 14 comments
Closed

Should be able to run with multiple env configurations #289

sswaroopgupta opened this issue Aug 20, 2018 · 14 comments

Comments

@sswaroopgupta
Copy link
Contributor

Proposed behavior
From the IDE, the user should be able to run specifying multiple environments

Current behavior
Able to run with the default configuration.

For further details, please refer getgauge/gauge#1109

@Vaahin
Copy link

Vaahin commented Nov 27, 2019

Is there any update on this feature ?

@zabil
Copy link
Member

zabil commented Nov 29, 2019

No updates for this at the moment.

@DvagNic
Copy link

DvagNic commented Feb 17, 2020

Alternatively it would be nice if the env variables could be specified as a setting for this extension. Then you could just append the envs to the gauge call:
gauge run <myspec> --simple-console --hide-suggestion --env <hardcoded_envs_from_extension_settings>

@zabil
Copy link
Member

zabil commented Mar 9, 2020

To make this generic Gauge VS Code plugin must add the commands

  • Run all specifications (with arguments)
  • Run scenario (with arguments)
  • Run scenarios (with arguments)

That will accept a set of arguments as input before running specifications or scenarios.

@guntribam
Copy link

This will be a nice feature to have? Can i help in some way @zabil ?

@zabil
Copy link
Member

zabil commented May 5, 2021

Yes, a PR would be awesome.

A good start would be to read a value from the gauge vs code plugin settings. Adding a key called

 gauge.execution.args: --env dev,

You can set that here and read it from the executor

@at6ue
Copy link
Contributor

at6ue commented Aug 29, 2021

This issue and #221 could be solved in the same way.
While @zabil suggested adding the property in settings.json, @sguptatw proposed having the properties in launch.json.
Which do you think is preferable?

The latter is probably similar to the case of Python plugin.

To customize settings for debugging tests, you can specify "request":"test" in the launch.json file in the .vscode folder from your workspace. This configuration will be used when you run Python: Debug All Tests and Python: Debug Test Method commands.
...
If you have more than one configuration entry with "request":"test", the first definition will be used since we currently don't support multiple definitions for this request type.

Because the debug configuration with "request":"test" is only for the setup, users will get an error message if they run with it from "Run and Debug" pane.

IMHO, it is better to have the properties in launch.json if you consider assigning properties to each run argument.
Having only gauge.execution.args as @zabil suggested is simple but instead users should know what kind of arguments are available.

If you are working on this I will leave it to you @guntribam. How is it?
Actually what I want is tags option though, I think I can implement others as well.

@guntribam
Copy link

i'm not working on this... @at6ue

@zabil
Copy link
Member

zabil commented Aug 30, 2021

IMHO, it is better to have the properties in launch.json if you consider assigning properties to each run argument.
Having only gauge.execution.args as @zabil suggested is simple but instead users should know what kind of arguments are available.

I agree that launch.json is a better way to manage this. I recommended settings.json because environment settings usually don't change much for example a dev environment on the developer machine. But then that is specific to only environments. Using a launch.json a user can set the environment and other parameters like #221

@sriv
Copy link
Member

sriv commented Aug 31, 2021

+1 to launch.json, I believe launch.json is idiomatic way to configure execution whereas settings.json can be for user settings/project settings.

@at6ue - please feel free to raise a PR for this.

@at6ue
Copy link
Contributor

at6ue commented Sep 1, 2021

settings.json can be for user settings/project settings.

I agree with this. I will send a PR in a few weeks.

@at6ue
Copy link
Contributor

at6ue commented Jan 16, 2022

Remind: This issue should be able to be closed now that #736 has been released.

@zabil zabil closed this as completed Jan 17, 2022
@sschulz92
Copy link

Is there any example how to use this cool feature? :) Thank you in advance!

@at6ue
Copy link
Contributor

at6ue commented Feb 22, 2022

@sschulz92
As documented here, you can specify gauge run options in your launch.json.
The video in #736 might help you to add your first configuration to launch.json. Then add properties to it, like ”env”: [“filename”].

Enjoy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

8 participants