我正在尝试通过使用Java自动化Web服务。我通过使用Java方法和使用testNg注释以两种方式进行了尝试

时间:2018-09-17 09:15:33

标签: java web-services automation soapui

@Test
public void m1(){

    System.out.println("Hi");
    System.out.println("I am writing script for Cucucmber");
    RestAssured.baseURI="http://restapi.demoqa.com/utilities/weather/city";
    RequestSpecification httpRequest=RestAssured.given();
    Response response=httpRequest.request(Method.GET,"/Hyderabad");
    String reponcexml=response.getBody().asString();
    System.out.println("Response body :"+reponcexml);
}

当我尝试使用上面的代码时,我面临以下问题。

错误:在类cumul_Startup.Cucumber_First中找不到主要方法,请将该主要方法定义为:    公共静态void main(String [] args) 或JavaFX应用程序类必须扩展javafx.application.Application

0 个答案:

没有答案