Search in sources :

Example 1 with PerlTestRunConfiguration

use of com.perl5.lang.perl.idea.run.prove.PerlTestRunConfiguration in project Perl5-IDEA by Camelcade.

the class PerlDebuggerTest method testTestsDebugging.

@Test
public void testTestsDebugging() {
    copyDirToModule("../run/testMore");
    PerlTestRunConfiguration testRunConfiguration = createTestRunConfiguration("t/subtest_is_passed_named.t");
    testRunConfiguration.setStartMode(PerlDebugOptionsSets.DEBUGGER_STARTUP_BREAKPOINT);
    setBreakPoint(getModuleFile("t/subtest_is_passed_named.t"), 5);
    Trinity<ExecutionEnvironment, RunContentDescriptor, XDebugSession> trinity = runConfigurationWithDebugger(testRunConfiguration);
    XDebugSession debugSession = trinity.third;
    assertStoppedAtLine(debugSession, 93);
    debugSession.resume();
    assertStoppedAtLine(debugSession, 5);
    debugSession.resume();
    ProcessHandler processHandler = trinity.second.getProcessHandler();
    assertNotNull(processHandler);
    waitForProcessFinish(processHandler);
    checkTestRunResultsWithFile(trinity.second);
}
Also used : ExecutionEnvironment(com.intellij.execution.runners.ExecutionEnvironment) RunContentDescriptor(com.intellij.execution.ui.RunContentDescriptor) ProcessHandler(com.intellij.execution.process.ProcessHandler) PerlTestRunConfiguration(com.perl5.lang.perl.idea.run.prove.PerlTestRunConfiguration) Test(org.junit.Test)

Example 2 with PerlTestRunConfiguration

use of com.perl5.lang.perl.idea.run.prove.PerlTestRunConfiguration in project Perl5-IDEA by Camelcade.

the class PerlPlatformTestCase method createTestRunConfiguration.

@NotNull
protected PerlTestRunConfiguration createTestRunConfiguration(@NotNull String file) {
    GenericPerlRunConfiguration runConfiguration = createOnlyRunConfiguration(file);
    assertInstanceOf(runConfiguration, PerlTestRunConfiguration.class);
    return (PerlTestRunConfiguration) runConfiguration;
}
Also used : PerlTestRunConfiguration(com.perl5.lang.perl.idea.run.prove.PerlTestRunConfiguration) GenericPerlRunConfiguration(com.perl5.lang.perl.idea.run.GenericPerlRunConfiguration) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

PerlTestRunConfiguration (com.perl5.lang.perl.idea.run.prove.PerlTestRunConfiguration)2 ProcessHandler (com.intellij.execution.process.ProcessHandler)1 ExecutionEnvironment (com.intellij.execution.runners.ExecutionEnvironment)1 RunContentDescriptor (com.intellij.execution.ui.RunContentDescriptor)1 GenericPerlRunConfiguration (com.perl5.lang.perl.idea.run.GenericPerlRunConfiguration)1 NotNull (org.jetbrains.annotations.NotNull)1 Test (org.junit.Test)1