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

Need to distinguish between TestBlock dependencies and test case dependencies #53

Closed
PandaMagnus opened this issue Aug 16, 2019 · 2 comments

Comments

@PandaMagnus
Copy link
Collaborator

Using this at a client now, and immediately ran into an issue with trying to set up a logger implementation... I have no way to add it at a level that can exist outside of a test block. If I add a AddTestCaseDependency method, I feel like that falls into inconsistent naming since the other methods are AddDependencyService and AddDependencyInstance.

Long story short, we need a way to help guide people into the correct scope without being confusing. I'm hesitant to open up a way to have free access to the ServiceContainer since we (generally) only have a limited subset of scopes and services that we want to deal with when executing a test case, and we want to avoid accidentally giving someone the ability to get into funky situations (re-instantiating Selenium every time, or not invoking a factory correct, or etc.)

@PandaMagnus
Copy link
Collaborator Author

Maybe an AddTestCaseDependency set of methods, and an AddTestBlockDependency set of methods?

I think for a short term fix I'll instantiate the logger in the test setup, add it to the ServiceContainer as a singleton instance (which there is already a method for) and then do the setup/teardown logging I need.

Another potential short term fix I'll investigate if I have time is to add a AddLogger<TService, TImplementation> method that adds the logger as a singleton so I can build some of the logging back down into TestBuilder so it comes "for free". This consideration probably makes this related to issue IntelliTect/TestTools.TestFramework#10

@PandaMagnus
Copy link
Collaborator Author

Haven't needed any other test case level dependencies other than a logger. Closing.

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