Skip to content
This repository has been archived by the owner on Apr 30, 2022. It is now read-only.

Remove requirement to have appsettings.json #286

Open
billros opened this issue Feb 26, 2020 · 3 comments
Open

Remove requirement to have appsettings.json #286

billros opened this issue Feb 26, 2020 · 3 comments
Assignees
Labels

Comments

@billros
Copy link

billros commented Feb 26, 2020

We promote automation of test cases as well as "Automation Assist" tools. However, MAQS is "streamlined" for the latter.

There are a number of utility methods in MAQS that are useful in utility tools, not just test cases. Much of our code assumes we are running within a test class/method and forces certain requirements... including the use of Appsettings.json (or App.config).

In a recent case, I wrote a utility that would screen-scrape an app (there was no API available) to get needed info out. I had to create the appsettings.json file, even though I was not using it for anything. Environment targetted, logging info/level, location, browser, browser options, were all controlled within my utility. Under the covers, MAQS was validating certain sections (SeleniumMAQS) and keys (WebSiteBase). I was controlling all the variables within my code, but MAQS would not work without that file. We have defaults for just about everything, why not run without it. If WebSiteBase is not present (because the file is not present) we can just open a brouser to about:blank, if we ever actually open a browser anyway. (in my utility, I over-rode the driver in the Test Object, so that value was never actually used!)

@jonreding2010
Copy link
Contributor

jonreding2010 commented Mar 25, 2020

I did some digging and the Validate method in Config.cs could be the reason for this..
Should we be checking if the config file exists before validating it?

@TroyWalshProf
Copy link
Contributor

Believable it or not it isn't that straight forward.
You really don't need a config file at all, every setting can get passed in via a runsettings or command line parameters. Would be a weird thing to do, but not so much so that we should prevent people form doing it.

@FermJacob
Copy link
Collaborator

@billros Can you re-validate this request?

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

No branches or pull requests

4 participants