oi now I am getting the error java.lang.NullPointerException: Cannot invoke method trim() on null object
with
package com.foo.jenkins
import com.maark.jenkins.testing.JenkinsPipelineSpecification
class SemVerSetTypeSpec extends JenkinsPipelineSpecification {
def "expected minor value"() {
setup:
def semVerSetType = loadPipelineScriptForTest("vars/semVerSetType.groovy")
when:
def type = semVerSetType("abc123")
1 * getPipelineMock("sh")([script: "git show -s --format=%s ${commitId}",
'returnStdout': true]) >> "Feature/test"
then:
type == "minor"
}
}
I thought trim
was core groovy
message?.trim()
or even better message?.trim() ?: ''
letter << ["a","b","c']
. Previously this was 3 tests and would get reported as "test letter a", "test letter b", and "test letter c". Now, it's getting reported like that except with the addition of "test letter #letter" also, as if there were 4 tests ran. Is there a way to not report on the method name?
DentalPlanSelectionPageTest > Dental plan: verify ecommerce footer for #state > geb.tests.DentalPlanSelectionPageTest.Dental plan: verify ecommerce footer for Default PASSED
DentalPlanSelectionPageTest > Dental plan: verify ecommerce footer for #state > geb.tests.DentalPlanSelectionPageTest.Dental plan: verify ecommerce footer for Colorado PASSED
DentalPlanSelectionPageTest > Dental plan: verify ecommerce footer for #state > geb.tests.DentalPlanSelectionPageTest.Dental plan: verify ecommerce footer for New York PASSED
DentalPlanSelectionPageTest > Dental plan: verify ecommerce footer for #state > geb.tests.DentalPlanSelectionPageTest.Dental plan: verify ecommerce footer for New Mexico PASSED
DentalPlanSelectionPageTest > Dental plan: verify ecommerce footer for #state > geb.tests.DentalPlanSelectionPageTest.Dental plan: verify ecommerce footer for Washington PASSED
DentalPlanSelectionPageTest > Dental plan: verify ecommerce footer for #state PASSED
Hello everyone. I have a problem similar to RealForce1024 but I already have the Jupiter dependency corretly setup. I'm trying to create a Spec but TestEngine with ID 'spock' failed to discover tests
.
Can anyone give me some light on this?
I'm using IntelliJ and this is my build.gradle
file:
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
implementation 'org.codehaus.groovy:groovy:3.0.10'
testImplementation platform("org.spockframework:spock-bom:2.1-groovy-3.0")
testImplementation "org.spockframework:spock-core"
testRuntimeOnly 'net.bytebuddy:byte-buddy:1.12.8'
}
test {
useJUnitPlatform()
}