Skip to content

Can I list all the FeatureInfo of a test project in a BeforeTestRun hook ? #275

Answered by gasparnagy
cmoinard-lucca asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately not. At the time of the test execution start (when we invoke the BeforeTestRun hook), we don't have the information of what tests are going to be executed (because of user defined filters), so we don't know anything neither about the scenario not about the features.
You can access to the loaded test assembly via ITestAssemblyProvider.TestAssembly and scan through the classes to find "feature" classes and read the attributes of them in order to get an info of the feature hooks, but it is not guaranteed that they will be needed finally.

What about implementing a classic locking and allow only one backup processing at a time?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cmoinard-lucca
Comment options

@gasparnagy
Comment options

Answer selected by cmoinard-lucca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants