# Call a Groovy Script from Test Case (Bdd Parallel testing)

**URL:** <https://forum.katalon.com/t/call-a-groovy-script-from-test-case-bdd-parallel-testing/22713>\
**Category:** Miscellaneous\
**Tags:** bdd-testing, katalon-studio\
**Created:** [April 8, 2019, 8:48pm UTC](https://forum.katalon.com/t/call-a-groovy-script-from-test-case-bdd-parallel-testing/22713 "2019-04-08T20:48:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramarajan.thiyagaraj](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@ramarajan.thiyagaraj](https://forum.katalon.com/u/ramarajan.thiyagaraj)\
**Post date:** [April 8, 2019, 8:48pm UTC](https://forum.katalon.com/t/call-a-groovy-script-from-test-case-bdd-parallel-testing/22713/1 "2019-04-08T20:48:32Z")

</div>

hi Team, There is one requirement, where I need to call a groovy script as one of the step in Test Case ? Can anyone please help me ?

Example: Call “MyLogin.groovy” or “MyLogin.class”

Thanks  
Ram.

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [April 8, 2019, 8:50pm UTC](https://forum.katalon.com/t/call-a-groovy-script-from-test-case-bdd-parallel-testing/22713/2 "2019-04-08T20:50:56Z")

</div>

You need to learn about Custom Keywords:

[https://docs.katalon.com/katalon-studio/docs/introduction-to-custom-keywords.html](https://docs.katalon.com/katalon-studio/docs/introduction-to-custom-keywords.html)

[https://docs.katalon.com/katalon-studio/videos/custom\_keywords\_and\_method\_call\_statements.html](https://docs.katalon.com/katalon-studio/videos/custom_keywords_and_method_call_statements.html)

---

<div class="post-metadata">

**Author:** ![ramarajan.thiyagaraj](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@ramarajan.thiyagaraj](https://forum.katalon.com/u/ramarajan.thiyagaraj)\
**Post date:** [April 9, 2019, 5:16pm UTC](https://forum.katalon.com/t/call-a-groovy-script-from-test-case-bdd-parallel-testing/22713/3 "2019-04-09T17:16:26Z")

</div>

Ok, Here is the problem statement.

Currently, BDD in Katalon doesn’t offer Parallel execution of scenarios/features. we are exploring the interim solution and we found one solution below and create a class for that. It cannot be called through CucumberKW.runWithCucumberRunner(null), but need to be called as another groovy script. Hence, exploring that options of how to call this groovy script or class. Class doesn’t have any methods inside. Just a class…

Katalon is very nice tool with the features, but parallel execution is something we are not able to achieve.

> **[GitHub - prashant-ramcharan/courgette-jvm: Multiprocess | Parallel...](https://github.com/prashant-ramcharan/courgette-jvm)**
>
> Multiprocess | Parallel Cucumber-JVM | Parallelize your Java Cucumber tests on a feature level or on a scenario level. - GitHub - prashant-ramcharan/courgette-jvm: Multiprocess | Parallel Cucumber-...

@RunWith(Courgette.class)  
@CourgetteOptions(  
threads = 10,  
runLevel = CourgetteRunLevel.SCENARIO,  
rerunFailedScenarios = true,  
rerunAttempts = 0,  
showTestOutput = true,  
reportTargetDir = “build”,  
cucumberOptions = @CucumberOptions(features = “Include/scripts/groovyInclude/features/TruckingWorker.feature”,glue = “”,plugin = [“pretty”,“json:build/cucumber-report/cucumber.json”,“html:build/cucumber-report/cucumber.html”,“junit:build/cucumber-report/cucumber.xml”],strict = true))  
public class CourgetteCucumberRunner1 {  
}

---

<div class="post-metadata">

**Author:** ![ramarajan.thiyagaraj](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@ramarajan.thiyagaraj](https://forum.katalon.com/u/ramarajan.thiyagaraj)\
**Post date:** [April 9, 2019, 5:53pm UTC](https://forum.katalon.com/t/call-a-groovy-script-from-test-case-bdd-parallel-testing/22713/5 "2019-04-09T17:53:30Z")

</div>

Hi Russ, I have changed the topic and category. thanks for pointing it out. shall wait for anyone to share their views…
