public class JUnitConfiguration extends JavaTestConfigurationWithDiscoverySupport implements InputRedirectAware
Modifier and Type | Class and Description |
---|---|
static class |
JUnitConfiguration.Data |
InputRedirectAware.InputRedirectOptions, InputRedirectAware.InputRedirectOptionsImpl
RunConfiguration.RestartSingletonResult
Modifier and Type | Field and Description |
---|---|
java.lang.String |
ALTERNATIVE_JRE_PATH |
boolean |
ALTERNATIVE_JRE_PATH_ENABLED |
static java.lang.String |
BY_SOURCE_CHANGES |
static java.lang.String |
BY_SOURCE_POSITION |
static java.lang.String |
FORK_KLASS |
static java.lang.String |
FORK_METHOD |
static java.lang.String |
FORK_NONE |
static java.lang.String |
FORK_REPEAT |
static byte |
FRAMEWORK_ID |
static java.lang.String |
JUNIT_START_CLASS |
static java.lang.String |
TEST_CATEGORY |
static java.lang.String |
TEST_CLASS |
static java.lang.String |
TEST_DIRECTORY |
static java.lang.String |
TEST_METHOD |
static java.lang.String |
TEST_PACKAGE |
static java.lang.String |
TEST_PATTERN |
static java.lang.String |
TEST_TAGS |
static java.lang.String |
TEST_UNIQUE_ID |
TO_CLONE_ELEMENT_NAME
TYPES_WITH_REDIRECT_AWARE_UI
DATA_KEY
Modifier | Constructor and Description |
---|---|
protected |
JUnitConfiguration(Project project,
JUnitConfiguration.Data data,
ConfigurationFactory configurationFactory) |
|
JUnitConfiguration(java.lang.String name,
Project project) |
|
JUnitConfiguration(java.lang.String name,
Project project,
ConfigurationFactory configurationFactory) |
protected |
JUnitConfiguration(java.lang.String name,
Project project,
JUnitConfiguration.Data data,
ConfigurationFactory configurationFactory) |
Modifier and Type | Method and Description |
---|---|
void |
beClassConfiguration(PsiClass testClass) |
void |
beFromSourcePosition(PsiLocation<? extends PsiMethod> sourceLocation) |
void |
beMethodConfiguration(Location<PsiMethod> methodLocation) |
void |
bePatternConfiguration(java.util.List<PsiClass> classes,
PsiMethod method) |
void |
checkConfiguration()
Checks whether the run configuration settings are valid.
|
boolean |
collectOutputFromProcessHandler() |
SMTRunnerConsoleProperties |
createTestConsoleProperties(Executor executor) |
java.lang.String |
getActionName()
Returns the text of the context menu action to start this run configuration.
|
java.lang.String |
getAlternativeJrePath() |
SettingsEditor<? extends RunConfiguration> |
getConfigurationEditor()
Returns the UI control for editing the run configuration settings.
|
static java.lang.String |
getDefaultPackageName() |
java.util.Map<java.lang.String,java.lang.String> |
getEnvs() |
java.lang.String |
getForkMode() |
InputRedirectAware.InputRedirectOptions |
getInputRedirectOptions() |
Module [] |
getModules() |
java.lang.String |
getPackage() |
JUnitConfiguration.Data |
getPersistentData() |
java.lang.String |
getProgramParameters() |
RefactoringElementListener |
getRefactoringElementListener(PsiElement element)
Returns a listener to handle a rename or move refactoring of the specified PSI element.
|
int |
getRepeatCount() |
java.lang.String |
getRepeatMode() |
java.lang.String |
getRunClass() |
TestObject |
getState(Executor executor,
ExecutionEnvironment env)
Prepares for executing a specific instance of the run configuration.
|
byte |
getTestFrameworkId() |
TestObject |
getTestObject() |
TestSearchScope |
getTestSearchScope() |
java.lang.String |
getTestType() |
java.util.Collection<Module> |
getValidModules() |
java.lang.String |
getVMParameters() |
java.lang.String |
getWorkingDirectory() |
boolean |
isAlternativeJrePathEnabled() |
boolean |
isConfiguredByElement(PsiElement element) |
boolean |
isPassParentEnvs() |
void |
readExternal(Element element) |
void |
setAlternativeJrePath(java.lang.String path) |
void |
setAlternativeJrePathEnabled(boolean enabled) |
void |
setCategory(java.lang.String categoryName) |
void |
setEnvs(java.util.Map<java.lang.String,java.lang.String> envs) |
void |
setForkMode(java.lang.String forkMode) |
void |
setMainClass(PsiClass testClass) |
void |
setPassParentEnvs(boolean passParentEnvs) |
void |
setProgramParameters(java.lang.String value) |
void |
setRepeatCount(int repeatCount) |
void |
setRepeatMode(java.lang.String repeatMode) |
void |
setSearchScope(TestSearchScope searchScope) |
void |
setVMParameters(java.lang.String value) |
void |
setWorkingDirectory(java.lang.String value) |
java.lang.String |
suggestedName()
Returns the default name for the run configuration based on its settings (such as the name of class or file to run).
|
void |
writeExternal(Element element) |
canRunOn, getDefaultLanguageRuntimeType, getDefaultTargetName, getShortenCommandLine, isUseModulePath, prepareParameterizedParameter, setDefaultTargetName, setShortenCommandLine, setUseModulePath
canRestoreOriginalModule, clone, createInstance, getAllModules, getConfigurationModule, getDefaultOptionsClass, getOptions, getState, isModuleDirMacroSupported, loadState, onNewConfigurationCreated, readModule, restoreOriginalModule, setModule, setModuleName, syncModuleName, writeModule
isGeneratedName, setGeneratedName, setNameChangedByUser
addLogFile, addLogFile, addPredefinedLogFile, checkRunnerSettings, checkSettingsBeforeRun, createAdditionalTabComponents, customizeLogConsole, equals, excludeCompileBeforeLaunchOption, getAllLogFiles, getBeforeRunTasks, getFactory, getIcon, getLogFiles, getName, getOptionsClass, getOptionsForPredefinedLogFile, getOutputFilePath, getPredefinedLogFiles, getProject, hashCode, isAllowRunningInParallel, isNewSerializationUsed, isSaveOutputToFile, isShowConsoleOnStdErr, isShowConsoleOnStdOut, onConfigurationCopied, removeAllLogFiles, removeAllPredefinedLogFiles, setAllowRunningInParallel, setBeforeRunTasks, setFileOutputPath, setName, setOptionsFromConfigurationFile, setSaveOutputToFile, setShowConsoleOnStdErr, setShowConsoleOnStdOut, toString
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
finalize, getClass, notify, notifyAll, wait, wait, wait
getInputFile, getInputRedirectOptions
clone, createRunnerSettings, getBeforeRunTasks, getFactory, getId, getPresentableType, getProject, getRunnerSettingsEditor, getType, getUniqueID, hideDisabledExecutorButtons, isAllowRunningInParallel, restartSingleton, setAllowRunningInParallel, setBeforeRunTasks, setName
getIcon, getName
getProject
getProject
getSearchScope
isBuildBeforeLaunchAddedByDefault, isBuildProjectOnEmptyModuleList, isExcludeCompileBeforeLaunchOption
public static final byte FRAMEWORK_ID
public static final java.lang.String TEST_CLASS
public static final java.lang.String TEST_PACKAGE
public static final java.lang.String TEST_DIRECTORY
public static final java.lang.String TEST_CATEGORY
public static final java.lang.String TEST_METHOD
public static final java.lang.String TEST_UNIQUE_ID
public static final java.lang.String TEST_TAGS
public static final java.lang.String BY_SOURCE_POSITION
public static final java.lang.String BY_SOURCE_CHANGES
public static final java.lang.String FORK_NONE
public static final java.lang.String FORK_METHOD
public static final java.lang.String FORK_KLASS
public static final java.lang.String FORK_REPEAT
public static final java.lang.String JUNIT_START_CLASS
public static final java.lang.String TEST_PATTERN
public boolean ALTERNATIVE_JRE_PATH_ENABLED
public java.lang.String ALTERNATIVE_JRE_PATH
public JUnitConfiguration(java.lang.String name, Project project, ConfigurationFactory configurationFactory)
public JUnitConfiguration(java.lang.String name, Project project)
protected JUnitConfiguration(java.lang.String name, Project project, JUnitConfiguration.Data data, ConfigurationFactory configurationFactory)
protected JUnitConfiguration(Project project, JUnitConfiguration.Data data, ConfigurationFactory configurationFactory)
public TestObject getState(Executor executor, ExecutionEnvironment env) throws ExecutionException
RunProfile
getState
in interface RunProfile
getState
in class JavaTestConfigurationBase
executor
- the execution mode selected by the user (run, debug, profile etc.)env
- the environment object containing additional settings for executing the configuration.ExecutionException
public SettingsEditor<? extends RunConfiguration> getConfigurationEditor()
RunConfiguration
CheckableRunConfigurationEditor
. The returned object
can also implement SettingsEditorGroup
if the settings it provides need to be displayed in
multiple tabs.getConfigurationEditor
in interface RunConfiguration
public JUnitConfiguration.Data getPersistentData()
public RefactoringElementListener getRefactoringElementListener(PsiElement element)
RefactoringListenerProvider
getRefactoringElementListener
in interface RefactoringListenerProvider
element
- the element on which a refactoring was invoked.public void checkConfiguration() throws RuntimeConfigurationException
RunConfiguration
checkConfiguration
in interface RunConfiguration
RuntimeConfigurationException
- if the configuration settings contain a non-fatal problem which the user should be warned about
but the execution should still be allowed.RuntimeConfigurationError
- if the configuration settings contain a fatal problem which makes it impossible
to execute the run configuration.public java.util.Collection<Module> getValidModules()
getValidModules
in class ModuleBasedConfiguration<JavaRunConfigurationModule,Element>
public java.lang.String suggestedName()
LocatableConfiguration
suggestedName
in interface LocatableConfiguration
public java.lang.String getActionName()
LocatableConfigurationBase
getActionName
in class LocatableConfigurationBase<Element>
public java.lang.String getVMParameters()
getVMParameters
in interface CommonJavaRunConfigurationParameters
public void setVMParameters(java.lang.String value)
setVMParameters
in interface CommonJavaRunConfigurationParameters
public java.lang.String getProgramParameters()
getProgramParameters
in interface CommonProgramRunConfigurationParameters
public void setProgramParameters(java.lang.String value)
setProgramParameters
in interface CommonProgramRunConfigurationParameters
public java.lang.String getWorkingDirectory()
getWorkingDirectory
in interface CommonProgramRunConfigurationParameters
public void setWorkingDirectory(java.lang.String value)
setWorkingDirectory
in interface CommonProgramRunConfigurationParameters
public java.util.Map<java.lang.String,java.lang.String> getEnvs()
getEnvs
in interface CommonProgramRunConfigurationParameters
public void setEnvs(java.util.Map<java.lang.String,java.lang.String> envs)
setEnvs
in interface CommonProgramRunConfigurationParameters
public boolean isPassParentEnvs()
isPassParentEnvs
in interface CommonProgramRunConfigurationParameters
public void setPassParentEnvs(boolean passParentEnvs)
setPassParentEnvs
in interface CommonProgramRunConfigurationParameters
public boolean isAlternativeJrePathEnabled()
isAlternativeJrePathEnabled
in interface CommonJavaRunConfigurationParameters
isAlternativeJrePathEnabled
in interface ConfigurationWithAlternativeJre
public void setAlternativeJrePathEnabled(boolean enabled)
setAlternativeJrePathEnabled
in interface CommonJavaRunConfigurationParameters
public java.lang.String getAlternativeJrePath()
getAlternativeJrePath
in interface CommonJavaRunConfigurationParameters
getAlternativeJrePath
in interface ConfigurationWithAlternativeJre
public void setAlternativeJrePath(java.lang.String path)
setAlternativeJrePath
in interface CommonJavaRunConfigurationParameters
public java.lang.String getRunClass()
getRunClass
in interface CommonJavaRunConfigurationParameters
public java.lang.String getPackage()
getPackage
in interface CommonJavaRunConfigurationParameters
public void beClassConfiguration(PsiClass testClass)
beClassConfiguration
in class JavaTestConfigurationBase
public boolean isConfiguredByElement(PsiElement element)
isConfiguredByElement
in class JavaTestConfigurationBase
public java.lang.String getTestType()
getTestType
in class JavaTestConfigurationBase
public TestSearchScope getTestSearchScope()
getTestSearchScope
in class JavaTestConfigurationBase
public void setSearchScope(TestSearchScope searchScope)
setSearchScope
in class JavaTestConfigurationBase
public void beFromSourcePosition(PsiLocation<? extends PsiMethod> sourceLocation)
public void setMainClass(PsiClass testClass)
public void setCategory(java.lang.String categoryName)
public void beMethodConfiguration(Location<PsiMethod> methodLocation)
beMethodConfiguration
in class JavaTestConfigurationBase
public Module [] getModules()
getModules
in interface RunProfileWithCompileBeforeLaunchOption
getModules
in class ModuleBasedConfiguration<JavaRunConfigurationModule,Element>
public TestObject getTestObject()
public InputRedirectAware.InputRedirectOptions getInputRedirectOptions()
getInputRedirectOptions
in interface InputRedirectAware
public void readExternal(Element element) throws InvalidDataException
readExternal
in interface RunConfiguration
readExternal
in class JavaTestConfigurationBase
InvalidDataException
public void writeExternal(Element element)
writeExternal
in interface RunConfiguration
writeExternal
in class JavaTestConfigurationBase
public java.lang.String getForkMode()
public void setForkMode(java.lang.String forkMode)
public boolean collectOutputFromProcessHandler()
collectOutputFromProcessHandler
in class RunConfigurationBase<Element>
public void bePatternConfiguration(java.util.List<PsiClass> classes, PsiMethod method)
bePatternConfiguration
in class JavaTestConfigurationBase
public int getRepeatCount()
public void setRepeatCount(int repeatCount)
public java.lang.String getRepeatMode()
public void setRepeatMode(java.lang.String repeatMode)
public SMTRunnerConsoleProperties createTestConsoleProperties(Executor executor)
createTestConsoleProperties
in interface SMRunnerConsolePropertiesProvider
public byte getTestFrameworkId()
getTestFrameworkId
in class JavaTestConfigurationWithDiscoverySupport
public static java.lang.String getDefaultPackageName()