Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

BDD with Cucumber and SOAtest

jakubiak
jakubiak Posts: 795 admin

SOAtest now supports BDD through integration with Cucumber. A Java module has been posted to Github that simplifies the creation of Cucumber step definitions by allowing you to create SOAtest tests as the implementation for what should happen at each step. This simplifies the entire approach and enables users to create meaningful step definitions without having to write code.

Head over to https://github.com/parasoft/soatest-cucumber to view documentation and a detailed tutorial about how to set it up.

Comments

  • simplymahmoud
    simplymahmoud Posts: 5
    edited August 2018

    I tried to use this tutorial but I always got error: Undefined step

    exclude patterns:
    Undefined step: Given I am user 12212

    Undefined step: And using funds from account 54321

    Undefined step: When I create a new loan account

    Undefined step: Then A new loan account should exist

    1 Scenarios (1 undefined)
    4 Steps (4 undefined)
    0m0.000s

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited August 2018

    Maven copies test resources from "src/test/resources". However, you put things in "src/resources". You need to move your "resources" folder under "src/test" instead of "src" for your project to build correctly.

  • Hi jakubiak, having runtime issues when I try to run the feature file.
    Class not found com.parasoft.example.parabank.cucumber.ParaBankSuite
    java.lang.ClassNotFoundException: com.parasoft.example.parabank.cucumber.ParaBankSuite
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:688)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:421)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

    even when I try to run the standalone step defition test file, getting "connection refused error" any thoughts/insights?

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    java.lang.ClassNotFoundException: com.parasoft.example.parabank.cucumber.ParaBankSuite

    You project might not be compiled. You need to make sure it is built (Project> Build Automatically).

    connection refused error

    Verify that SOAtest server is running on the host and port configured in your step definition json. Otherwise, connection would be refused.