My First Test on Java with Allure and JUnit

Добрый вечер. Я начинаю писать тесты на Java, с использованием Maven, JUnit и пытаюсь сгенерировать отчет в Allure. Придумала пример, просмотрела кучу примеров в интернете, и решила попробовать сама. Но при запуске тесте в IntellijIDEA возникла вот такая ошибка, я не понимаю что не так.Пересмотрела и перепробовала кучу решений и не одно пока не подошло.

Вот ошибка:

Error opening zip file or JAR manifest missing : C:\Users\Vika
Error occurred during initialization of VM
agent library failed to init: instrument

Вот здесь находится мой пример:

Пожалуйста помогите разобраться.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.asenwer93</groupId>
    <artifactId>testSber</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <aspectj.version>1.8.10</aspectj.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.8.1</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-junit4</artifactId>
            <version>2.0-BETA21</version>
        </dependency>
        
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.3</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20.1</version>
                <configuration>
                    <argLine>
                        -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                    </argLine>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>io.qameta.allure.junit4.AllureJunit4</value>
                        </property>
                    </properties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>2.6</version>
            </plugin>
        </plugins>
    </reporting>

</project>

с таким помом заработало, но надо править ещё код, т.к. вы используете и TestNG и Junit вместе, что некорректно.

  • подправить аннотации у тестов в соответствии с докой Allure Framework

Поменяла pom.xml: на Ваше содержание.Ссылку на документацию знаю, брала информацию и оттуда.Однако пока не все понимаю.Помогите привести приложение в нормальный работающий пример для будущих разработок.
Сейчас, после внесения изменений, у меня изменилась ошибка, пожалуйста помогите.
Вот ошибка:
C:\Java\jdk1.8.0_152\bin\java -ea “-javaagent:C:\Users\Vika I.m2\repository/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar” -Didea.test.cyclic.buffer.size=1048576 “-javaagent:E:\JAVA_MAIN\IDE\IntelliJ IDEA Community Edition 2017.2.6\lib\idea_rt.jar=60233:E:\JAVA_MAIN\IDE\IntelliJ IDEA Community Edition 2017.2.6\bin” -Dfile.encoding=UTF-8 -classpath “E:\JAVA_MAIN\IDE\IntelliJ IDEA Community Edition 2017.2.6\lib\idea_rt.jar;E:\JAVA_MAIN\IDE\IntelliJ IDEA Community Edition 2017.2.6\plugins\junit\lib\junit-rt.jar;E:\JAVA_MAIN\IDE\IntelliJ IDEA Community Edition 2017.2.6\plugins\junit\lib\junit5-rt.jar;C:\Java\jdk1.8.0_152\jre\lib\charsets.jar;C:\Java\jdk1.8.0_152\jre\lib\deploy.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\access-bridge-32.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\cldrdata.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\dnsns.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\jaccess.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\jfxrt.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\localedata.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\nashorn.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\sunec.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\sunjce_provider.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\sunmscapi.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\sunpkcs11.jar;C:\Java\jdk1.8.0_152\jre\lib\ext\zipfs.jar;C:\Java\jdk1.8.0_152\jre\lib\javaws.jar;C:\Java\jdk1.8.0_152\jre\lib\jce.jar;C:\Java\jdk1.8.0_152\jre\lib\jfr.jar;C:\Java\jdk1.8.0_152\jre\lib\jfxswt.jar;C:\Java\jdk1.8.0_152\jre\lib\jsse.jar;C:\Java\jdk1.8.0_152\jre\lib\management-agent.jar;C:\Java\jdk1.8.0_152\jre\lib\plugin.jar;C:\Java\jdk1.8.0_152\jre\lib\resources.jar;C:\Java\jdk1.8.0_152\jre\lib\rt.jar;F:\IdeaProjects\SecuritySpringTemp\Temp\Asewer-sbertesttask\target\test-classes;F:\IdeaProjects\SecuritySpringTemp\Temp\Asewer-sbertesttask\target\classes;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-java\3.8.1\selenium-java-3.8.1.jar;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-api\3.8.1\selenium-api-3.8.1.jar;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\3.8.1\selenium-chrome-driver-3.8.1.jar;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\3.8.1\selenium-edge-driver-3.8.1.jar;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\3.8.1\selenium-firefox-driver-3.8.1.jar;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\3.8.1\selenium-ie-driver-3.8.1.jar;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-opera-driver\3.8.1\selenium-opera-driver-3.8.1.jar;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\3.8.1\selenium-remote-driver-3.8.1.jar;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\3.8.1\selenium-safari-driver-3.8.1.jar;C:\Users\Vika I.m2\repository\org\seleniumhq\selenium\selenium-support\3.8.1\selenium-support-3.8.1.jar;C:\Users\Vika I.m2\repository\net\bytebuddy\byte-buddy\1.7.5\byte-buddy-1.7.5.jar;C:\Users\Vika I.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\Vika I.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\Vika I.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\Vika I.m2\repository\com\google\code\gson\gson\2.8.2\gson-2.8.2.jar;C:\Users\Vika I.m2\repository\com\google\guava\guava\23.0\guava-23.0.jar;C:\Users\Vika I.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\Vika I.m2\repository\com\google\errorprone\error_prone_annotations\2.0.18\error_prone_annotations-2.0.18.jar;C:\Users\Vika I.m2\repository\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;C:\Users\Vika I.m2\repository\org\codehaus\mojo\animal-sniffer-annotations\1.14\animal-sniffer-annotations-1.14.jar;C:\Users\Vika I.m2\repository\org\apache\httpcomponents\httpclient\4.5.3\httpclient-4.5.3.jar;C:\Users\Vika I.m2\repository\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;C:\Users\Vika I.m2\repository\junit\junit\4.12\junit-4.12.jar;C:\Users\Vika I.m2\repository\io\qameta\allure\allure-junit4\2.0-BETA21\allure-junit4-2.0-BETA21.jar;C:\Users\Vika I.m2\repository\io\qameta\allure\allure-java-commons\2.0-BETA21\allure-java-commons-2.0-BETA21.jar;C:\Users\Vika I.m2\repository\io\qameta\allure\allure2-model-api\1.0-BETA6\allure2-model-api-1.0-BETA6.jar;C:\Users\Vika I.m2\repository\io\qameta\allure\allure2-model-pojo\1.0-BETA6\allure2-model-pojo-1.0-BETA6.jar;C:\Users\Vika I.m2\repository\org\apache\tika\tika-core\1.14\tika-core-1.14.jar;C:\Users\Vika I.m2\repository\io\qameta\allure\allure2-model-jackson\1.0-BETA6\allure2-model-jackson-1.0-BETA6.jar;C:\Users\Vika I.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.7.0\jackson-databind-2.7.0.jar;C:\Users\Vika I.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.7.0\jackson-annotations-2.7.0.jar;C:\Users\Vika I.m2\repository\com\fasterxml\jackson\core\jackson-core\2.7.0\jackson-core-2.7.0.jar;C:\Users\Vika I.m2\repository\com\fasterxml\jackson\module\jackson-module-jaxb-annotations\2.7.0\jackson-module-jaxb-annotations-2.7.0.jar;C:\Users\Vika I.m2\repository\org\apache\commons\commons-lang3\3.5\commons-lang3-3.5.jar;C:\Users\Vika I.m2\repository\org\aspectj\aspectjrt\1.8.10\aspectjrt-1.8.10.jar;C:\Users\Vika I.m2\repository\org\jooq\joor\0.9.6\joor-0.9.6.jar;C:\Users\Vika I.m2\repository\org\slf4j\slf4j-api\1.7.21\slf4j-api-1.7.21.jar;C:\Users\Vika I.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar” com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.asenwer93.sber.Test
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See SLF4J Error Codes for further details.
1515599624773 Marionette DEBUG Received DOM event “beforeunload” for “about:blank”
1515599625283 Marionette DEBUG Received DOM event “pagehide” for “about:blank”
1515599625283 Marionette DEBUG Received DOM event “unload” for “about:blank”
1515599625809 Marionette DEBUG Received DOM event “DOMContentLoaded” for “https://yandex.ru/
1515599626029 Marionette DEBUG Received DOM event “pageshow” for “https://yandex.ru/
1515599626110 Marionette DEBUG Received DOM event “beforeunload” for “https://yandex.ru/
1515599626925 Marionette DEBUG Received DOM event “pagehide” for “https://yandex.ru/
1515599626927 Marionette DEBUG Received DOM event “unload” for “https://yandex.ru/
1515599627084 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967301”
1515599627817 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515599628468 Marionette DEBUG Received DOM event “pageshow” for “Ой!
1515599628553 Marionette DEBUG Received DOM event “beforeunload” for “Ой!
1515599629139 Marionette DEBUG Received DOM event “pagehide” for “Ой!
1515599629140 Marionette DEBUG Received DOM event “unload” for “Ой!
1515599629202 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967306”
1515599629202 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967304”
1515599630355 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515599631237 Marionette DEBUG Received DOM event “pageshow” for “Ой!
1515599631294 Marionette DEBUG Received DOM event “beforeunload” for “Ой!
1515599632556 Marionette DEBUG Received DOM event “pagehide” for “Ой!
1515599632560 Marionette DEBUG Received DOM event “unload” for “Ой!
1515599632693 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967311”
1515599632694 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967309”
1515599633799 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515599634560 Marionette DEBUG Received DOM event “pageshow” for “Ой!
1515599634648 Marionette DEBUG Received DOM event “beforeunload” for “Ой!
1515599635418 Marionette DEBUG Received DOM event “pagehide” for “Ой!
1515599635420 Marionette DEBUG Received DOM event “unload” for “Ой!
1515599636345 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515599636354 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967316”
1515599636355 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967314”
1515599636861 Marionette DEBUG Received DOM event “pageshow” for “Ой!
1515599637245 Marionette DEBUG Canceled page load listener because no navigation has been detected
1515599638104 Marionette DEBUG Canceled page load listener because no navigation has been detected
1515599638596 Marionette DEBUG Canceled page load listener because no navigation has been detected
1515599638644 Marionette DEBUG Received DOM event “beforeunload” for “Ой!
1515599639213 Marionette DEBUG Received DOM event “pagehide” for “Ой!
1515599639218 Marionette DEBUG Received DOM event “unload” for “Ой!
1515599639339 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967321”
1515599639339 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967319”
1515599640290 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515599641010 Marionette DEBUG Received DOM event “pageshow” for “Ой!
Unable to read VR Path Registry from C:\Users\Vika I\AppData\Local\openvr\openvrpaths.vrpath
[Parent 6848, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
Unable to read VR Path Registry from C:\Users\Vika I\AppData\Local\openvr\openvrpaths.vrpath
[Child 6908, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346

java.lang.AssertionError:
Expected: is <10>
but: was <12>
Expected :is <10>

Actual :<12>

at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:956)
at org.junit.rules.ErrorCollector$1.call(ErrorCollector.java:65)
at org.junit.rules.ErrorCollector.checkSucceeds(ErrorCollector.java:78)
at org.junit.rules.ErrorCollector.checkThat(ErrorCollector.java:63)
at org.junit.rules.ErrorCollector.checkThat(ErrorCollector.java:54)
at com.asenwer93.sber.Test.test1(Test.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.Verifier$1.evaluate(Verifier.java:35)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

org.openqa.selenium.NoSuchSessionException: Session ID is null. Using WebDriver after calling quit()?
Build info: version: ‘3.8.1’, revision: ‘6e95a6684b’, time: ‘2017-12-01T18:33:54.468Z’
System info: host: ‘VIKA’, ip: ‘192.168.56.1’, os.name: ‘Windows 8.1’, os.arch: ‘x86’, os.version: ‘6.3’, java.version: ‘1.8.0_152’
Driver info: driver.version: RemoteWebDriver

at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:131)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:398)
at org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(RemoteWebDriver.java:477)
at org.openqa.selenium.By$ByXPath.findElements(By.java:356)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:359)
at com.asenwer93.sber.pages.market.YandexMarketTabletsPage.getNameElement(YandexMarketTabletsPage.java:127)
at com.asenwer93.sber.Test.test2(Test.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.Verifier$1.evaluate(Verifier.java:35)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

1515599621258 geckodriver INFO geckodriver 0.19.1
1515599621258 geckodriver INFO Listening on 127.0.0.1:8959
1515599622086 mozrunner::runner INFO Running command: “C:\Program Files\Mozilla Firefox\firefox.exe” “-marionette” “-profile” “C:\Users\VIKAI~1\AppData\Local\Temp\rust_mozprofile.y3lOt1um22jq”
1515599622595 Marionette INFO Enabled via --marionette
Unable to read VR Path Registry from C:\Users\Vika I\AppData\Local\openvr\openvrpaths.vrpath
[Child 6192, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
1515599623725 Marionette INFO Listening on port 60291
1515599624204 Marionette WARN TLS certificate errors will be ignored for this session
1515599624290 Marionette DEBUG Register listener.js for window 4294967297
янв 10, 2018 6:53:44 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C

Process finished with exit code -1

Вот адрес источника, изменения внесены:forFacebook/Asewer-sbertesttask at master · DevelopmentTempVika/forFacebook · GitHub

Добавила изменения для pom.xml, немного поправила код.Ссылку на документацию я знаю, смотрела, но однако многое непонятно.И я сейчас не очень понимаю, где какую анотацию нужно ставить. Сейчас тест проходит, НО отчет в Allure не создается. Помогите, пожалуйста, доделать пример. Он для меня будет служить примером для других новых приложений.

Вот что вывелось в консоли:
1515610185035 Marionette DEBUG Received DOM event “beforeunload” for “about:blank”
1515610185439 Marionette DEBUG Received DOM event “pagehide” for “about:blank”
1515610185439 Marionette DEBUG Received DOM event “unload” for “about:blank”
1515610186085 Marionette DEBUG Received DOM event “DOMContentLoaded” for “https://yandex.ru/
1515610186701 Marionette DEBUG Received DOM event “pageshow” for “https://yandex.ru/
1515610186860 Marionette DEBUG Received DOM event “beforeunload” for “https://yandex.ru/
1515610187056 Marionette DEBUG Received DOM event “pagehide” for “https://yandex.ru/
1515610187057 Marionette DEBUG Received DOM event “unload” for “https://yandex.ru/
1515610187217 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967301”
1515610187882 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515610188318 Marionette DEBUG Received DOM event “pageshow” for “Ой!
1515610188403 Marionette DEBUG Received DOM event “beforeunload” for “Ой!
1515610188680 Marionette DEBUG Received DOM event “pagehide” for “Ой!
1515610188683 Marionette DEBUG Received DOM event “unload” for “Ой!
1515610188785 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967306”
1515610188785 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967304”
1515610189805 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515610190408 Marionette DEBUG Received DOM event “pageshow” for “Ой!
1515610190487 Marionette DEBUG Received DOM event “beforeunload” for “Ой!
1515610191293 Marionette DEBUG Received DOM event “pagehide” for “Ой!
1515610191295 Marionette DEBUG Received DOM event “unload” for “Ой!
1515610191431 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967311”
1515610191432 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967309”
1515610192379 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515610192907 Marionette DEBUG Received DOM event “pageshow” for “Ой!
1515610193008 Marionette DEBUG Received DOM event “beforeunload” for “Ой!
1515610193646 Marionette DEBUG Received DOM event “pagehide” for “Ой!
1515610193648 Marionette DEBUG Received DOM event “unload” for “Ой!
1515610193769 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967316”
1515610193769 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967314”
1515610194576 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515610195386 Marionette DEBUG Received DOM event “pageshow” for “Ой!
1515610195711 Marionette DEBUG Canceled page load listener because no navigation has been detected
1515610196578 Marionette DEBUG Canceled page load listener because no navigation has been detected
1515610197097 Marionette DEBUG Canceled page load listener because no navigation has been detected
1515610197132 Marionette DEBUG Received DOM event “beforeunload” for “Ой!
1515610197615 Marionette DEBUG Received DOM event “pagehide” for “Ой!
1515610197619 Marionette DEBUG Received DOM event “unload” for “Ой!
1515610197737 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967321”
1515610197738 Marionette DEBUG Received observer notification “outer-window-destroyed” for “4294967319”
1515610198535 Marionette DEBUG Received DOM event “DOMContentLoaded” for “Ой!
1515610199249 Marionette DEBUG Received DOM event “pageshow” for “Ой!
[Parent 3136, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346

java.lang.AssertionError:
Expected: is <10>
but: was <12>
Expected :is <10>

Actual :<12>

at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:956)
at org.junit.rules.ErrorCollector$1.call(ErrorCollector.java:65)
at org.junit.rules.ErrorCollector.checkSucceeds(ErrorCollector.java:78)
at org.junit.rules.ErrorCollector.checkThat(ErrorCollector.java:63)
at org.junit.rules.ErrorCollector.checkThat(ErrorCollector.java:54)
at com.asenwer93.sber.Test.test1(Test.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.Verifier$1.evaluate(Verifier.java:35)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

org.openqa.selenium.NoSuchSessionException: Session ID is null. Using WebDriver after calling quit()?
Build info: version: ‘3.8.1’, revision: ‘6e95a6684b’, time: ‘2017-12-01T18:33:54.468Z’
System info: host: ‘VIKA’, ip: ‘192.168.56.1’, os.name: ‘Windows 8.1’, os.arch: ‘x86’, os.version: ‘6.3’, java.version: ‘1.8.0_152’
Driver info: driver.version: RemoteWebDriver

at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:131)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:398)
at org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(RemoteWebDriver.java:477)
at org.openqa.selenium.By$ByXPath.findElements(By.java:356)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:359)
at com.asenwer93.sber.pages.market.YandexMarketTabletsPage.getNameElement(YandexMarketTabletsPage.java:127)
at com.asenwer93.sber.Test.test2(Test.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.Verifier$1.evaluate(Verifier.java:35)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

1515610180409 geckodriver INFO geckodriver 0.19.1
1515610180425 geckodriver INFO Listening on 127.0.0.1:18052
1515610181214 mozrunner::runner INFO Running command: “C:\Program Files\Mozilla Firefox\firefox.exe” “-marionette” “-profile” “C:\Users\VIKAI~1\AppData\Local\Temp\rust_mozprofile.IzPsdNKph2ag”
1515610181989 Marionette INFO Enabled via --marionette
Unable to read VR Path Registry from C:\Users\Vika I\AppData\Local\openvr\openvrpaths.vrpath
[Parent 3136, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
Unable to read VR Path Registry from C:\Users\Vika I\AppData\Local\openvr\openvrpaths.vrpath
[Child 2440, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[Child 2440, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
1515610183484 Marionette INFO Listening on port 49828
1515610184442 Marionette WARN TLS certificate errors will be ignored for this session
1515610184513 Marionette DEBUG Register listener.js for window 4294967297
янв 10, 2018 9:49:44 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C

Process finished with exit code -1

Вот адрес измененного источника:

Взял ваш код, тесты падают.
Посмотрите в сторону #selenide и будет проще понимать свои же код когда он станет в раз 10 меньше.
При работе с драйвером, вы получаете какие-то инстансы и пытаетесь его на все окно развернуть и все это занимает много места.
Теперь как оно будет красиво.

    @Before
    public void setUp(){
        System.setProperty("webdriver.chrome.driver","./src/test/drivers/chrome/chromedriver.exe");
        com.codeborne.selenide.Configuration.browser = "chrome";
        com.codeborne.selenide.Configuration.startMaximized = true;
    }

вот и все.
С алюром не подскажу, но могу предложить альтернативу в виде report.portal с ним как то проще docker и один класс с listener и все.
Если перевести ваш код на selenide, то он станет понятнее и меньше в раз 5.

1 лайк