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

Method to read configuration from testconfig.json #1576

Open
nicholass-alcidion opened this issue Jan 16, 2025 · 0 comments
Open

Method to read configuration from testconfig.json #1576

nicholass-alcidion opened this issue Jan 16, 2025 · 0 comments

Comments

@nicholass-alcidion
Copy link

It would be highly useful for us to have a mechanims to read configuration from the testconfig.json

Previously in xunit we would use .runsettings and specify <RunSettings><RunConfiguration><EnvironmentVariables> and then read these envrionment at test time. This was used for example to know what database server(s) to connect to.

Given that Microsoft.Testing.Platform makes use of testconfig.json (and envrionment varialbes) in a method similar to Microsoft.Extensions.Configuration - it would be useful to have a way to use this to read custom configuration properties.

I am hoping for something similar to TestContext.Configuration.Get("config:property:path");

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

No branches or pull requests

1 participant