Tag: 自动化测试

restAssured – 不能掌握post方法

同胞stackoverflowians 🙂 我一直在用戒烟的时间来使用Gmail API进行邮寄。 一直试图使用createDraft和createLabel。 现在我想我已经找到了正确的(主要)如何做到这一点,但我得到这个错误: java.lang.AssertionError: 1 expectation failed. Expected status code <200> but was <400>. 我意识到发生这个错误,因为我做出不正确的请求。 你能帮我一下吗? 这是我的代码: import io.restassured.RestAssured.* import io.restassured.http.ContentType import io.restassured.matcher.RestAssuredMatchers.* import org.hamcrest.Matchers.* import org.testng.annotations.Test class RestAPIAutoTestPost { @Test fun createLabelInGoogleMail() { RestAssured.baseURI = "https://www.googleapis.com/gmail/v1/users/me" val accessToken = "ya29.Glw7BEv6***" val jsonAsMap = HashMap<String, Any>() jsonAsMap.put("id", "labelAPITestNameID") jsonAsMap.put("labelListVisibility", "labelShow") jsonAsMap.put("messageListVisibility", "show") […]

jvmArgs设置的魅力报告

我试图通过ussing生成报告 gradlew clean test 命令。 它失败,错误: Error occured during intialization of VM Error opening zip file or JAR nanifest missing : ${configurations.agent.singleFile} 这是我的build.gradle文件: group 'RegisteredUserFlow' version '1.0-SNAPSHOT' buildscript { ext.kotlin_version = '1.1.2-2' repositories { jcenter() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } apply plugin: 'kotlin' repositories { jcenter() } configurations { agent } dependencies { […]

Allure在本地机器上生成空的报告页面

正如标题所说,我不能强迫Allure 2在本地机器上为我生成报告。 我尝试了很多谷歌的东西,但没有任何帮助。 我使用Kotlin + Selenide + TestNG编写测试,如果它帮助某种方式:)我有点混淆testNG ,因为它有testNG版本和Gradle版本 – 哪一个应该使用? 都? 这是我的build.gradle文件: group 'RegisteredUserFlow' version '1.0-SNAPSHOT' buildscript { ext.kotlin_version = "1.1.2-2" repositories { jcenter() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "ru.d10xa:gradle-allure-plugin:0.5.5" } } apply plugin: 'kotlin' apply plugin: 'java' apply plugin: 'ru.d10xa.allure' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 allure { aspectjweaver = true testNG […]