The best way to assign Tasks to these newly spun up resources, would be to use a Resource Pool. A resource pool will dynamically assign a task to use the available resources that it contains. As long as there are other available resources in the pool, this will also ensure that the test or process will not Hang or get orphaned if a new machine is not brought up properly or goes down.
Because you can dynamically add Resources into a Resource pool, even during a App Process run, you can Add the Resource to the pool after the resource has been created or just before launching the 'Test' Tasks.
If there are no resources in the resource pool, the step will not have a resource available at the time it has been created, the system will set the step to 'waiting for resource'. In this case, you could add a Resource to the pool to continue the job. This will allow you to avoid Hanging jobs that are assigned to newly created resources.