karatelabs / karate

Test Automation Made Simple
https://karatelabs.github.io/karate
MIT License
8.26k stars 1.94k forks source link

Debug - DB validation- Run New feature with DemoTestParallel.java #134

Closed arkadiyala closed 7 years ago

arkadiyala commented 7 years ago

@ Peter Thomas I have added the same to stackflow and here is the link https://stackoverflow.com/questions/45555929/debug-framework-db-connection-to-framework

Here are steps I'm following:

  1. Cloned Karate framework from link - https://github.com/arkadiyala/karate
  2. Go to Karate-Demo → src/test/java → demo → DemoTestParallel.java and click on run.
  3. Go to Karate-Demo → target → cucumber-html-reports → overview → features.html. I see excellent report here and i like it. I would like get similar reports.

Please help me on below.

  1. I want to debug feature (Karate-Demo → src/test/java → demo.callfeature → call-once.feature) by using eclipse. I have kept breakpoint on callOnceRunner.java, however script execution is not pausing.

  2. If i want to automate different webservice(Example : https:// myorg.com/name) , what configuration file/Environment variable file should i update?

  3. Is it possible to perform below tasks with this framework. If not, where should i add my own java code to this framework? a) Insert data into DB --> Then post web-service call --> Get Web-service response --> Compare Web-service response with DB values?

    b) Get data(Example: name) from DB with SQL query(Example: Select id from table- name where id =1)--> Then post web-service call with name(Like https://myorg.com/name) --> Get Web-service response --> Compare Web-service response with entire DB values?
  4. I have added new files(JenkinsRunner.java & Jenkins.feature) under Karate-Demo → src/test/java → Jenkins -> Then go to Karate-Demo → src/test/java → demo--> Run DemoTestParallel.java Newly added Jenkins.feature did not run. Please help me on it ASAP. Here is my newly added code.

Jenkins.feature: Feature: Demo Karate against Jenkins Scenario: Verify that Jenkins is up and running Given url 'http: //localhost:8080/api/json?pretty=true' When method get Then status 200 And match response.jobs[*].name contains ['JoeProject1']

JenkinsRunner.java: package Jenkins; import demo.TestBase; /* @author pthomas3 / public class JenkinsRunner extends TestBase { }

arkadiyala commented 7 years ago

Closing this issue as i have opened the same in stackflow. https://stackoverflow.com/questions/45555929/debug-framework-db-connection-to-framework