GreenMoose;8054 wrote:
1)
My scenario is:
I tests which exlusively uses "database", and tests testing an http endpoint, only run by remote grid nodes towards my local machine.
So "database" tests can be executed in parallelll on each grid node since the exclusively uses is "per grid node" (right? couldn't actually find if this was the case in documentation) but the http tests must not run in parallell on grid nodes since they end up at the same http endpoint.
Thus the http tests I would like to have ExclusivelyUses("HttpEndpoint"), but that be impacted on solution level, sortof a ExlusivelyUses-Isolated i.e. all tests using "HttpEndpoint" should be run in serial, no matter which grid node is executing them, since they all ends up at same http endpoint.
Your understanding of the implementation of ExclusivelyUses (and InclusivelyUses) is correct. The scope of this constraint will only apply to the machine that is physically running the test. This means that if you have a grid full of nodes that depend upon a single resource for the entire grid, which cannot be access concurrently, then these mechanisms can't effectively be used to restrict access. The only way I can think of doing this would be to mark a test as being only able to run on a specific node so that the ExclusivelyUses constraint could be applied within a narrow scope. Alternatively, you could look at implementing your own concurrency control feature inside the test, communicating with the client machine to coordinate access (rather painful).
GreenMoose;8054 wrote:
2)
I have performance tests which I want to be run on specific grid nodes (RequireCapability usage), but they should not be run along with other tests (to avoid affecting measurements) on the same grid node.
Thus I'm after a sortof "Gridnode-serial" attribute, i.e. other grid nodes should be allowed to continue. Is there a way to do this? Or is the current behavior of existing "Serial" attribute perhaps?
Thanks.
Under the hood, SerialAttribute is physically implemented using a combination of InclusivelyUses("Test Runner") for the entire queue, and ExclusivelyUses("Test Runner") for the serial tests. This means that the attribute will only apply in the scope of an individual grid node, so using it in combination with RequiresCapabilityAttribute should already give you want you are looking for here :)