asenok152 / Ordercard

0 stars 0 forks source link

не запускаются тесты на CI: file not found #1

Open asenok152 opened 4 years ago

asenok152 commented 4 years ago
  1. с целью адаптации кода для запуска на Linux, была добавлена строка в appveyor.yml
    • ps: chmod +x ./gradlew
  2. в CI не нашлась папка с исходными кодами проекта, gradle пропустил тесты:

Build started git clone -q --branch=master https://github.com/asenok152/Ordercard.git /home/appveyor/projects/ordercard git checkout -qf ad2314bb12602866248a8a94d52a06a014c75f11 Running "install" scripts $App = Start-Process -FilePath java -ArgumentList "-jar ./artifacts/app-order.jar" -PassThru Running "build_script" scripts chmod +x ./gradlew Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 ./gradlew test --info "-Dselenide.headless=true" Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 Downloading https://services.gradle.org/distributions/gradle-5.2.1-bin.zip 2019-12-26 20:36:33.734 [main] TRACE Application - {

application.conf @ jar:file:/home/appveyor/projects/ordercard/artifacts/app-order.jar!/application.conf: 6

"application" : {
    # application.conf @ jar:file:/home/appveyor/projects/ordercard/artifacts/app-order.jar!/application.conf: 7
    "modules" : [
        # application.conf @ jar:file:/home/appveyor/projects/ordercard/artifacts/app-order.jar!/application.conf: 7
        "ru.netology.aqa.ApplicationKt.module"
    ]
},
# application.conf @ jar:file:/home/appveyor/projects/ordercard/artifacts/app-order.jar!/application.conf: 2
"deployment" : {
    # application.conf @ jar:file:/home/appveyor/projects/ordercard/artifacts/app-order.jar!/application.conf: 3
    "port" : 9999
},
# Content hidden
"security" : "***"

} 2019-12-26 20:36:34.071 [DefaultDispatcher-worker-2] INFO Application - No ktor.deployment.watch patterns specified, automatic reload is not active 2019-12-26 20:36:34.935 [DefaultDispatcher-worker-2] INFO Application - Responding at http://0.0.0.0:9999 ................................................................................... Initialized native services in: /home/appveyor/.gradle/native Welcome to Gradle 5.2.1! Here are the highlights of this release:

coursar commented 4 years ago

Судя по этим логам, тест всё-таки запустился:

TestClass > someTest() STANDARD_ERROR
    Dec 26, 2019 8:37:06 PM com.codeborne.selenide.drivercommands.LazyDriver getAndCheckWebDriver
    INFO: No webdriver is bound to current thread: 11 - let's create a new webdriver
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    Dec 26, 2019 8:37:06 PM java.util.prefs.FileSystemPreferences$1 run
    INFO: Created user preferences directory.
    Starting ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614}) on port 15439
    Only local connections are allowed.
    Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
    Dec 26, 2019 8:37:11 PM org.openqa.selenium.remote.ProtocolHandshake createSession
    INFO: Detected dialect: W3C
    Dec 26, 2019 8:37:11 PM com.codeborne.selenide.webdriver.BrowserResizer adjustBrowserSize
    INFO: Set browser size to 1366x768
    Dec 26, 2019 8:37:11 PM com.codeborne.selenide.webdriver.WebDriverFactory logBrowserVersion
    INFO: BrowserName=chrome Version=79.0.3945.79 Platform=LINUX
    Dec 26, 2019 8:37:11 PM com.codeborne.selenide.webdriver.WebDriverFactory createWebDriver
    INFO: Selenide v. 5.3.1
    Dec 26, 2019 8:37:11 PM com.codeborne.selenide.webdriver.WebDriverFactory logSeleniumInfo
    INFO: Selenium WebDriver v. 3.141.59 build time: 2018-11-14T08:17:03
    Dec 26, 2019 8:37:11 PM com.codeborne.selenide.drivercommands.CreateDriverCommand createDriver
    INFO: Create webdriver in current thread 11: ChromeDriver -> ChromeDriver: chrome on LINUX (96fb6e208bd73e2a34ad638d9f13f045)
<===========--> 85% EXECUTING [29s]
Gradle Test Executor 1 finished executing tests.
> :test
> Task :test
Finished generating test XML results (0.029 secs) into: /home/appveyor/projects/ordercard/build/test-results/test
Generating HTML test report...
Finished generating test html results (0.039 secs) into: /home/appveyor/projects/ordercard/build/reports/tests/test
:test (Thread[Execution worker for ':',5,main]) completed. Took 12.263 secs.
BUILD SUCCESSFUL in 41s