jetbrains.buildServer.agent
Class FirstTestsToRunProvider

java.lang.Object
  extended by jetbrains.buildServer.agent.FirstTestsToRunProvider

public class FirstTestsToRunProvider
extends java.lang.Object


Nested Class Summary
static interface FirstTestsToRunProvider.ClassObjectDescriptor
           
 
Method Summary
static FirstTestsToRunProvider create()
           
 ChangedFiles getBuildVcsChanges()
           
 VcsChange getCorrespondingChange(java.lang.String className)
          Returns VcsChange object if the source file of the specified class name is new or modified.
 java.util.List getRecentlyFailedTestCases()
           
 boolean isAvailable()
           
 boolean isGroupIncluded(java.lang.String groupName)
           
 void sortTestClasses(java.util.List testClasses, FirstTestsToRunProvider.ClassObjectDescriptor classObjectDescriptor)
          Sorts test classes according by placing recently failed and modified tests at the top of the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static FirstTestsToRunProvider create()

isAvailable

public boolean isAvailable()

getBuildVcsChanges

public ChangedFiles getBuildVcsChanges()

getRecentlyFailedTestCases

public java.util.List getRecentlyFailedTestCases()
Returns:
list of recently failed test classes.

getCorrespondingChange

public VcsChange getCorrespondingChange(java.lang.String className)
Returns VcsChange object if the source file of the specified class name is new or modified.

Parameters:
className - name of the class
Returns:
see above

sortTestClasses

public void sortTestClasses(java.util.List testClasses,
                            FirstTestsToRunProvider.ClassObjectDescriptor classObjectDescriptor)
Sorts test classes according by placing recently failed and modified tests at the top of the list. Order is: * Classes affected by personal vcs changes * Classes affected by other vcs changes * Classes with recently failed tests * All other classes

Parameters:
testClasses - classes to sort
classObjectDescriptor - describes class objects which should be sorted

isGroupIncluded

public boolean isGroupIncluded(java.lang.String groupName)