Перейти к содержимому

eglu2015

Регистрация: 06 июл 2016
Offline Активность: 18 авг 2016 14:35
-----

Мои сообщения

В теме: Запуск Cucumber тестов в параллели?

08 июля 2016 - 11:47

 

 

 

Ух ёпт. У тебя эти таги не указаны!
Запиши:    <tags>@runTest</tags>
 
 
<configuration>
                            <!-- Mandatory -->
                            <!-- comma separated list of package names to scan for glue code -->
                            <glue>ru.StepDefinitions</glue>
                            <!-- These are the default values -->
                            <!-- Where to output the generated Junit tests -->
                            <outputDirectory>${project.build.directory}/generated-test-sources/cucumber</outputDirectory>
                            <!-- The diectory containing your feature files. -->
                            <featuresDirectory>src/test/Resorses/Features/</featuresDirectory>
                            <!-- Directory where the cucumber report files shall be written -->
                            <cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir>
                            <!-- comma separated list of output formats -->
                            <format>html</format>
                            <!-- CucumberOptions.strict property -->
                            <strict>true</strict>
                            <!-- CucumberOptions.monochrome property -->
                            <monochrome>true</monochrome>
                            <!-- The tags to run, maps to CucumberOptions.tags property -->
                            <tags></tags>
                            <!-- If set to true, only feature files containing the required
                            tags shall be generated. -->
                            <!-- Excluded tags (~@notMe) are ignored. -->
                            <filterFeaturesByTags>true</filterFeaturesByTags>
                        </configuration>

 

 
В секцию добавил <tags>"@runTest"</tags>
Вот такая ошибка у меня возникла, которую я победить не смог (( 
ошибка была и ранее, когда настраивал по вашему сценарию
 
D:\git\AQC\test>mvn clean test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for ru:rts-tender:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-surefire-plugin @ line 104, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building rts-tender 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rts-tender ---
[INFO] Deleting D:\git\AQC\test\target
[INFO]
[INFO] --- cucumber-jvm-parallel-plugin:1.3.0:generateRunners (generateRunners) @ rts-tender ---
[INFO] Adding D:\git\AQC\test\target\generated-test-sources\cucumber to test-compile source root
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rts-tender ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\git\AQC\test\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ rts-tender ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 111 source files to D:\git\AQC\test\target\classes
[INFO] /D:/git/AQC/test/src/main/java/Helpers/UserProfiles/SupplierLegalEntityProfile.java: Some input files use unchecked or unsafe operations.
[INFO] /D:/git/AQC/test/src/main/java/Helpers/UserProfiles/SupplierLegalEntityProfile.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ rts-tender ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\git\AQC\test\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ rts-tender ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to D:\git\AQC\test\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ rts-tender ---
 
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
None of the features at [classpath:Features/AccreditationEntrepreneur.feature] matched the filters: [@runTest]
None of the features at [classpath:Features/FullAuction.feature] matched the filters: [@runTest]
 
0 Scenarios
0 Steps
0m0,000s
 
 
0 Scenarios
0 Steps
0m0,000s
 
 
Results :
 
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.258 s
[INFO] Finished at: 2016-07-07T18:14:18+03:00
[INFO] Final Memory: 26M/311M
[INFO] ------------------------------------------------------------------------

 

было такое. Проблема решилась перемещением файлов фичей в первую после resources папку (не далее). и переименуй всё в lowercase.  Плагин капризный! :)

\src\test\resources\cucumber\TestCase.feature

 

привет, спасибо огромное помогло ))  


В теме: Запуск Cucumber тестов в параллели?

07 июля 2016 - 15:21

 

Ух ёпт. У тебя эти таги не указаны!
Запиши:    <tags>@runTest</tags>
 
 
<configuration>
                            <!-- Mandatory -->
                            <!-- comma separated list of package names to scan for glue code -->
                            <glue>ru.StepDefinitions</glue>
                            <!-- These are the default values -->
                            <!-- Where to output the generated Junit tests -->
                            <outputDirectory>${project.build.directory}/generated-test-sources/cucumber</outputDirectory>
                            <!-- The diectory containing your feature files. -->
                            <featuresDirectory>src/test/Resorses/Features/</featuresDirectory>
                            <!-- Directory where the cucumber report files shall be written -->
                            <cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir>
                            <!-- comma separated list of output formats -->
                            <format>html</format>
                            <!-- CucumberOptions.strict property -->
                            <strict>true</strict>
                            <!-- CucumberOptions.monochrome property -->
                            <monochrome>true</monochrome>
                            <!-- The tags to run, maps to CucumberOptions.tags property -->
                            <tags></tags>
                            <!-- If set to true, only feature files containing the required
                            tags shall be generated. -->
                            <!-- Excluded tags (~@notMe) are ignored. -->
                            <filterFeaturesByTags>true</filterFeaturesByTags>
                        </configuration>

 

 
В секцию добавил <tags>"@runTest"</tags>
Вот такая ошибка у меня возникла, которую я победить не смог (( 
ошибка была и ранее, когда настраивал по вашему сценарию
 
D:\git\AQC\test>mvn clean test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for ru:rts-tender:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-surefire-plugin @ line 104, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building rts-tender 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rts-tender ---
[INFO] Deleting D:\git\AQC\test\target
[INFO]
[INFO] --- cucumber-jvm-parallel-plugin:1.3.0:generateRunners (generateRunners) @ rts-tender ---
[INFO] Adding D:\git\AQC\test\target\generated-test-sources\cucumber to test-compile source root
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rts-tender ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\git\AQC\test\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ rts-tender ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 111 source files to D:\git\AQC\test\target\classes
[INFO] /D:/git/AQC/test/src/main/java/Helpers/UserProfiles/SupplierLegalEntityProfile.java: Some input files use unchecked or unsafe operations.
[INFO] /D:/git/AQC/test/src/main/java/Helpers/UserProfiles/SupplierLegalEntityProfile.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ rts-tender ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\git\AQC\test\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ rts-tender ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to D:\git\AQC\test\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ rts-tender ---
 
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
None of the features at [classpath:Features/AccreditationEntrepreneur.feature] matched the filters: [@runTest]
None of the features at [classpath:Features/FullAuction.feature] matched the filters: [@runTest]
 
0 Scenarios
0 Steps
0m0,000s
 
 
0 Scenarios
0 Steps
0m0,000s
 
 
Results :
 
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.258 s
[INFO] Finished at: 2016-07-07T18:14:18+03:00
[INFO] Final Memory: 26M/311M
[INFO] ------------------------------------------------------------------------

В теме: Запуск Cucumber тестов в параллели?

07 июля 2016 - 13:55

В архиве features и структура


В теме: Запуск Cucumber тестов в параллели?

07 июля 2016 - 07:33

У меня есть две (feateres)

@runTest
Feature: Accreditation Individual Entrepreneur

@runTest

Feature: User Create Auction

 

запуск произвожу через командную строку:

mvn test -Dcucumber.options="src/test/Resorses/Features --tags @runTest"

 

он мне запускает параллельно сценарий из Feature: Accreditation Individual Entrepreneur (в двух браузерах)

и после завершения из Feature: User Create Auction

 

а я можно сделать так чтоб одновременно запускался сценарий из Feature: Accreditation Individual Entrepreneur (в одном окне браузере) 

и Feature: User Create Auction в другом окне

 

 

 

 

 


В теме: Запуск Cucumber тестов в параллели?

06 июля 2016 - 13:34

Всем привет, 

вопрос по поводу параллельного запуска тестов на cucumbere.

Как сделать одновременный запуск двух разных тестов из разных features?