Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

Suggest an answer

Log in or Sign up to answer

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

I have the same issue.

TAGS
AUG Leaders

Atlassian Community Events