Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Script Runner - IntelliJ Test integration Edited

Hey,

i was following the following Guide for Testing:
Testing your Code

 

And stumbled into the following Error's while trying to get run the Test from the IDE.

2019-02-20 11:03:20,452 http-nio-8080-exec-7 ERROR admin 663x727x2 1y98v 127.0.0.1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.common.admin.RunUnitTests [c.o.s.c.common.admin.RunUnitTests] *************** FAILED initializationError(org.junit.runner.manipulation.Filter) ********************
2019-02-20 11:03:20,459 http-nio-8080-exec-7 WARN admin 663x727x2 1y98v 127.0.0.1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.common.admin.RunUnitTests [c.o.s.c.common.admin.RunUnitTests] Test: initializationError(org.junit.runner.manipulation.Filter) failed
java.lang.Exception: No tests found matching method name filter from org.junit.runner.Request$1@21909616
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at org.junit.runner.JUnitCore$run$0.call(Unknown Source)
at com.onresolve.scriptrunner.canned.common.admin.RunUnitTests.doScript(RunUnitTests.groovy:326)

Thats my corresponding test class:

package de.mycompany.jira.example

import com.onresolve.scriptrunner.canned.common.admin.ScriptRunnerTestRunner
import org.junit.runner.RunWith
import spock.lang.Specification

@RunWith(ScriptRunnerTestRunner)
class TestRunnerSampleSpec extends Specification {

def "test something"() {
expect:
true
}
}

 

i suspect that i have to set the default package for the test, but i don't know where and how.

 

 

Moreover, there was already a similar question in the community, unfortunately no one could answer it.

That's why I link it again

Similar question from mid 2018

 

I am very thankful for ever idea and tipp to get around this issue :)

2 answers

I have the same issue.

I was able to run tests from Idea when in field Packages (screenshot) in Jira package with tests was specified.  For example, if you tests are in com.yourcompany.scriptrunner.test, this package should be specified in Jira UI. It took a lot of my time to figure this out.  done.PNG

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Share your Confluence Cloud experience for a chance to win $500!

Take our 5-minute survey to win a $500 Visa gift card! Are you currently using Confluence Cloud? We want to hear from you! Fill out this quick survey about your Confluence Cloud experience so we ...

144 views 1 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you