allure-framework / allure-codeception Goto Github PK
View Code? Open in Web Editor NEWCodeception framework adapter for Allure
License: Apache License 2.0
Codeception framework adapter for Allure
License: Apache License 2.0
Describe the bug
In the first version of the Allure PHP adapter, the display of steps was implemented differently. However, in the new version of the PHP adapter, there are no substeps as such. Instead, only function parameters are displayed in steps in the Allure report.
To Reproduce
Steps to reproduce the behavior:
Allure::runStep()
functionExpected behavior
There are no parameters inside the steps
Devices
Doesn't matter
Additional context
See test example
Describe the bug
Field fullName is empty in allure report and it's difficult to search tests
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Field fullName equals to Fully qualified method name such as \Foo\Bar::fooBar
Desktop (please complete the following information):
If any project will require two allure-framework packages (in our case allure-phpunit and allure-codeception) we will have two classes which have identical full class names: Yandex\Allure\Adapter\AllureAdapter
.
It will cause an issue for autoloader to load appropriate adaptor for codeception and phpunit.
Make namespace unique.
For example:
Yandex\Allure\Codeception\Adapter\AllureAdapter
Yandex\Allure\PHPUnit\Adapter\AllureAdapter
Or class name unique
Yandex\Allure\Adapter\CodeceptionAllureAdapter
Yandex\Allure\Adapter\PHPUnitAllureAdapter
Is there an documented way how to use "allure-codeception" without composer? Thanks.
It seems the auto-update on packagist not working.
I can't see 1.4.0 there but the tag is already there.
Please check that packagist can handle updates! Thanks @baev
Interactive console started for suite acceptance
Try Codeception commands without writing a test
type 'exit' to leave console
type 'actions' to see all available actions for this suite
[PHPUnit_Framework_Exception]
file_get_contents(): Filename cannot be empty
Tests work well. Console does not work with allure extension.
Hi,
After a successfully executed test ("./vendor/bin/codecept" run acceptance "myTestCept.php" --debug -vvv
I get the following error
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "@JMS\Serializer\Annotation\XmlNamespace" in class Yandex\Allure\Adapter\Model\TestSuite does not exist, or could not be auto-loaded.
Exception trace:
() at %replaced-path%codeception_composer\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\AnnotationException.php:54
Doctrine\Common\Annotations\AnnotationException::semanticalError() at %replaced-path%codeception_composer\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\DocParser.php:706
Doctrine\Common\Annotations\DocParser->Annotation() at %replaced-path%codeception_composer\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\DocParser.php:639
Doctrine\Common\Annotations\DocParser->Annotations() at %replaced-path%codeception_composer\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\DocParser.php:334
Doctrine\Common\Annotations\DocParser->parse() at %replaced-path%codeception_composer\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\AnnotationReader.php:185
Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations() at %replaced-path%codeception_composer\vendor\jms\serializer\src\JMS\Serializer\Metadata\Driver\AnnotationDriver.php:8
JMS\Serializer\Metadata\Driver\AnnotationDriver->loadMetadataForClass() at %replaced-path%codeception_composer\vendor\jms\metadata\src\Metadata\MetadataFactory.php:103
Metadata\MetadataFactory->getMetadataForClass() at %replaced-path%codeception_composer\vendor\jms\serializer\src\JMS\Serializer\GraphNavigator.php:180
JMS\Serializer\GraphNavigator->accept() at %replaced-path%codeception_composer\vendor\jms\serializer\src\JMS\Serializer\Serializer.php:91
JMS\Serializer\Serializer->serialize() at %replaced-path%codeception_composer\vendor\allure-framework\allure-php-api\src\Yandex\Allure\Adapter\Model\TestSuite.php:223
Yandex\Allure\Adapter\Model\TestSuite->serialize() at %replaced-path%codeception_composer\vendor\allure-framework\allure-php-api\src\Yandex\Allure\Adapter\Allure.php:168
Yandex\Allure\Adapter\Allure->saveToFile() at %replaced-path%codeception_composer\vendor\allure-framework\allure-php-api\src\Yandex\Allure\Adapter\Allure.php:162
Yandex\Allure\Adapter\Allure->processTestSuiteFinishedEvent() at %replaced-path%codeception_composer\vendor\allure-framework\allure-php-api\src\Yandex\Allure\Adapter\Allure.php:82
Yandex\Allure\Adapter\Allure->fire() at %replaced-path%codeception_composer\vendor\allure-framework\allure-codeception\src\Yandex\Allure\Adapter\AllureAdapter.php:92
Yandex\Allure\Adapter\AllureAdapter->suiteAfter() at n/a:n/a
call_user_func() at %replaced-path%codeception_composer\vendor\symfony\event-dispatcher\Symfony\Component\EventDispatcher\EventDispatcher.php:164
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at %replaced-path%codeception_composer\vendor\symfony\event-dispatcher\Symfony\Component\EventDispatcher\EventDispatcher.p
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at %replaced-path%codeception_composer\vendor\codeception\codeception\src\Codeception\SuiteManager.php:154
Codeception\SuiteManager->run() at %replaced-path%codeception_composer\vendor\codeception\codeception\src\Codeception\Codecept.php:172
Codeception\Codecept->runSuite() at %replaced-path%codeception_composer\vendor\codeception\codeception\src\Codeception\Codecept.php:155
Codeception\Codecept->run() at %replaced-path%codeception_composer\vendor\codeception\codeception\src\Codeception\Command\Run.php:143
Codeception\Command\Run->execute() at %replaced-path%codeception_composer\vendor\symfony\console\Symfony\Component\Console\Command\Command.php:252
Symfony\Component\Console\Command\Command->run() at %replaced-path%codeception_composer\vendor\symfony\console\Symfony\Component\Console\Application.php:887
Symfony\Component\Console\Application->doRunCommand() at %replaced-path%codeception_composer\vendor\symfony\console\Symfony\Component\Console\Application.php:193
Symfony\Component\Console\Application->doRun() at %replaced-path%codeception_composer\vendor\symfony\console\Symfony\Component\Console\Application.php:124
Symfony\Component\Console\Application->run() at %replaced-path%codeception_composer\vendor\codeception\codeception\codecept:27
Codeception version is 2.0.0
"./vendor/bin/codecept" --v
Codeception version 2.0.0
codeception.yml
includes
extensions:
enabled: [Yandex\Allure\Adapter\AllureAdapter]
and in composer.json
I have
{
"require": {
"codeception/codeception": "2.0.0",
"php": ">=5.4.0",
"allure-framework/allure-codeception": "~1.0.0"
}
}
composer update
says
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Any ideas how to fix that?
I have an error while run test by Codeception 5.0 and allure-codeception 2.1.0
Steps To Reproduce
Steps to reproduce the behavior:
Sorry, problem resolved. outdated information in readme file .
I have an issue while trying to generate a report.
An exception:
Exception in thread "main" java.lang.NumberFormatException: For input string:
"1.50642981892E+12"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
The XML file line that includes this string is:
<alr:test-suite xmlns:alr="urn:model.allure.qatools.yandex.ru" start="1.50642981892E+12" stop="1.5064299142E+12" version="1.4.0">
The message that the report is created.
Allure version | 2.3.5 |
---|---|
Test framework | [email protected] |
Allure adaptor | [email protected] |
Generate report using | [email protected] |
Hey guys, we've problem using allure in our project.(codeception 3.0.2 + behat/gherkin 4.4.0 + allure 1.4.0 )
Summary: when we run .features in codeception , allure generates xml file using name feature instead name scenario. And when in one feature there are few scenario, than allure generate just last scenario.
For example
Feature: FooterLinksTest
I want to check all links in footer
Background:
When I log in to the site, i click button
@footerLinksTest
Scenario: footerLinksTest
Then check links in Footer
@HeaderLinksTest
Scenario: HeadeLinksTest
Then check links in Header
after run .feature FooterLinksTest
we get a result allure xml
<?xml version="1.0" encoding="UTF-8"?>
<alr:test-suite xmlns:alr="urn:model.allure.qatools.yandex.ru" start="1621868275968" stop="1621868340898" version="1.4.0">
<name>acceptance (chromeheadless)</name>
<test-cases>
<test-case start="1621868280976" stop="1621868340846" status="passed">
<name>HeadeLinksTest</name>
<steps>
<step start="1621868281331" stop="1621868281331" status="passed">
<name> i want to check all links in Header </name>
</step>
</steps>
<labels>
<label name="footerLinksTest" value="feature"/>
</labels>
</test-case>
</test-cases>
</alr:test-suite>
and first scenario was lost
SOLUTION
if you change this
$testName = $test->getMetadata()->getFeature();
to this
$testName = $test->getScenarioNode()->getTitle();
private function buildTestName($test) {
$testName = get_class($test->getTestClass()) . '::' . $test->getName();
if ($test instanceof Cest) {
if(isset($this->testInvocations[$testName])) {
$this->testInvocations[$testName]++;
} else {
$this->testInvocations[$testName] = 0;
}
$currentExample = $test->getMetadata()->getCurrent();
if ($currentExample && isset($currentExample['example']) ) {
$testName .= ' with data set #' . $this->testInvocations[$testName];
}
} else if($test instanceof Gherkin) {
$testName = $test->getScenarioNode()->getTitle();
}
return $testName;
}
after changed allure generates every scenario
What do you think about it? or did you miss something ?
For now, layer (acceptance, manual, etc.) can be set for each test individually, requiring a lot of work. It seems that we can set this label automatically.
Is there support for Cept format tests?
When you have a Codeception test that includes a @env Test Annotation, like the following, and you run it you receive an Allure related error message:
use Magento\AcceptanceTestFramework\AcceptanceTester;
use Yandex\Allure\Adapter\Annotation\Features;
use Yandex\Allure\Adapter\Annotation\Stories;
use Yandex\Allure\Adapter\Annotation\Title;
use Yandex\Allure\Adapter\Annotation\Description;
use Yandex\Allure\Adapter\Annotation\Parameter;
use Yandex\Allure\Adapter\Annotation\Severity;
use Yandex\Allure\Adapter\Model\SeverityLevel;
use Yandex\Allure\Adapter\Annotation\TestCaseId;
/**
* @env chrome
* @env firefox
* @env phantomjs
*/
class LogIntoAdminCest
{
public function logIntoAdmin(AcceptanceTester $I)
{
$I->amOnPage("admin/admin");
$I->fillField("#username", "user");
$I->fillField("#login", "blahblah");
$I->click(".actions .action-primary");
$I->seeInCurrentUrl("admin/admin");
}
}
[Semantical Error] The annotation "@env" in method
LogIntoAdminCest::logIntoAdmin() was never imported. Did you maybe
forget to add a "use" statement for this annotation?
Exception trace:
() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php:54
Doctrine\Common\Annotations\AnnotationException::semanticalError() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:727
Doctrine\Common\Annotations\DocParser->Annotation() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:663
Doctrine\Common\Annotations\DocParser->Annotations() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:354
Doctrine\Common\Annotations\DocParser->parse() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php:284
Doctrine\Common\Annotations\AnnotationReader->getMethodAnnotations() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php:71
Doctrine\Common\Annotations\IndexedReader->getMethodAnnotations() at /vendor/allure-framework/allure-php-api/src/Yandex/Allure/Adapter/Annotation/AnnotationProvider.php:43
Yandex\Allure\Adapter\Annotation\AnnotationProvider::getMethodAnnotations() at /vendor/allure-framework/allure-codeception/src/Yandex/Allure/Adapter/AllureAdapter.php:250
Yandex\Allure\Adapter\AllureAdapter->testStart() at n/a:n/a
call_user_func() at /vendor/symfony/event-dispatcher/EventDispatcher.php:212
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /vendor/symfony/event-dispatcher/EventDispatcher.php:44
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /vendor/codeception/codeception/src/Codeception/PHPUnit/Listener.php:90
Codeception\PHPUnit\Listener->startTest() at /vendor/phpunit/phpunit/src/Framework/TestResult.php:386
PHPUnit_Framework_TestResult->startTest() at /vendor/codeception/codeception/src/Codeception/Test/Test.php:74
Codeception\Test\Test->run() at /vendor/phpunit/phpunit/src/Framework/TestSuite.php:722
PHPUnit_Framework_TestSuite->run() at /vendor/codeception/codeception/src/Codeception/PHPUnit/Runner.php:106
Codeception\PHPUnit\Runner->doEnhancedRun() at /vendor/codeception/codeception/src/Codeception/SuiteManager.php:157
Codeception\SuiteManager->run() at /vendor/codeception/codeception/src/Codeception/Codecept.php:184
Codeception\Codecept->runSuite() at /vendor/codeception/codeception/src/Codeception/Codecept.php:175
Codeception\Codecept->run() at /vendor/codeception/codeception/src/Codeception/Command/Run.php:376
Codeception\Command\Run->runSuites() at /vendor/codeception/codeception/src/Codeception/Command/Run.php:303
Codeception\Command\Run->execute() at /vendor/symfony/console/Command/Command.php:264
Symfony\Component\Console\Command\Command->run() at /vendor/symfony/console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at /vendor/symfony/console/Application.php:228
Symfony\Component\Console\Application->doRun() at /vendor/symfony/console/Application.php:130
Symfony\Component\Console\Application->run() at /vendor/codeception/codeception/src/Codeception/Application.php:103
Codeception\Application->run() at /vendor/codeception/codeception/codecept:36
run [-o|--override OVERRIDE] [-e|--ext EXT] [--report] [--html [HTML]] [--xml [XML]] [--tap [TAP]] [--json [JSON]] [--colors] [--no-colors] [--silent] [--steps] [-d|--debug] [--coverage [COVERAGE]] [--coverage-html [COVERAGE-HTML]] [--coverage-xml [COVERAGE-XML]] [--coverage-text [COVERAGE-TEXT]] [--coverage-crap4j [COVERAGE-CRAP4J]] [--no-exit] [-g|--group GROUP] [-s|--skip SKIP] [-x|--skip-group SKIP-GROUP] [--env ENV] [-f|--fail-fast] [--no-rebuild] [--] [<suite>] [<test>]
I should be able to list a non-allure tag in the codeception.yml
file and have Allure ignore those tags.
enabled:
- Codeception\Extension\RunFailed
- Yandex\Allure\Adapter\AllureAdapter
config:
Yandex\Allure\Adapter\AllureAdapter:
deletePreviousResults: true
outputDirectory: allure-results
ignoredAnnotations:
- zephyrId
- env
After the following commit, 5088ee4f7a6f76dfc4d664d4d2ac8ebd2697de01, was made our Codeception project no longer runs when the @env annotation is included in a Test.
After reverting some of the changes that were made to the _initialize function our Tests began running without the above error.
Hey guys, we've encountered some problem using allure in our project.
Summary: when you have same test names in different Cests - you see in report just 1 (last) test.
How to reproduce:
Actual behavior:
Test report contains 1 test.
Expected behavior:
Test report contains 2 tests.
We can reproduce issue at this repo:
https://github.com/barsukov2/codeception-allure-error
And for now we don't have a good solution. First thought, that we at
https://github.com/allure-framework/allure-codeception/blob/a69800eeef83007ced9502a3349ff72f5fb6b4e2/src/Yandex/Allure/Codeception/AllureCodeception.php
we can modify buildTestName()
and build $testName
like $testFullName
For example,
private function buildTestName($test) {
$testName = get_class($test->getTestClass()) . '::' . $test->getName();
if ($test instanceof Cest) {
if(isset($this->testInvocations[$testName])) {
$this->testInvocations[$testName]++;
} else {
$this->testInvocations[$testName] = 0;
}
$currentExample = $test->getMetadata()->getCurrent();
if ($currentExample && isset($currentExample['example']) ) {
$testName .= ' with data set #' . $this->testInvocations[$testName];
}
} else if($test instanceof Gherkin) {
$testName = $test->getMetadata()->getFeature();
}
return $testName;
}
Actually, it works.
But maybe there is a better solution... Please, any thoughts? :)
the number of tests decreased tragically on the report generated. Normally I have around 500 tests executed, since the latest release I can only see 154 tests.
What I checked:
so, everything was fine except the report itself, so I guess the problem would be on the report generation process itself.
The number of tests went back to normal when I downgraded to 1.4.0
Windows 7, 10
allure-codeception 1.2.6
After this example code:
public function loginSuccessfully(AcceptanceTester $I)
{
$I->fillField('[name="text"]', "Codeception");
$I->click('Найти');
$I->comment('Перешли на сайт яндекса');
$I->comment('We are going on yandex');
}
I get allure result in xml:
<step start="1517603309475" stop="1517603309475" status="passed"> <name>߰Р 𰠼/name> </step> <step start="1517603309475" stop="1517603309475" status="passed"> <name>we are going on yandex </name> </step>
And when i run allure generate i get errors like:
com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 middle byte 0xf0 (at char #790, byte #37)
In previous version 1.2.5 it works correctly.
Hi all,
We've configured the latest dev version with codeception 2.2.10
extensions:
enabled:
- Codeception\Extension\RunFailed
- Yandex\Allure\Adapter\AllureAdapter
config:
Yandex\Allure\Adapter\AllureAdapter:
deletePreviousResults: false
outputDirectory: allure-results
We have the following feature file in tests/acceptance:
@login
Feature: login
As a registered user
I want the ability to login
Using email and password
Scenario Outline: Login
Given that I am on "Home Page"
When I go to "Login Page"
And I enter <email> as the email address
And I enter <password> as the password
And I login
Then I should be on <page>
Examples:
| email | password | page |
| "[email protected]" | "pass1!" | "Account Dashboard Page" |
| "[email protected]" | "pass1!" | "Login Page" |
| "[email protected]" | "incorrectPassword" | "Login Page" |
We can run the tests and they behave as expected.
When I run allure generate tests/_output/allure-results
(I have on my mac allure command line tools 1.4.23 installed with brew) I get a report with the following issues:
$I->click()
).Please see a screenshot with the obtained report:
I also attached the xml file (you need to change the extension from .txt to .xml).
4f8a921d-2dfe-48c3-a065-008b71f1c234-testsuite.txt
Could you provide an update to the extension class to support Codeception 2.1? They changed a few things concerning extensions and namespaces, which seem to break this version.
Hello!
I tried to add custom ignored annotations with something like
config:
Yandex\Allure\Adapter\AllureAdapter:
deletePreviousResults: true
outputDirectory: allure-results
ignoredAnnotations:
- myAnnotation1
- myAnnotation2
I can see that they are applied to config value, but these config values are not used in the AllureAdapter class. Is it the correct way to configure custom ignored annotations or is it a bug? Thanks!
On running test cases in parallel using Spock , everytime allure-results folder is deleting the earlier xmls. Is there a way where the allure-results folder does not remove the old xmls? Please advice
These lines of code call the updateTestCaseEvent
method twice
https://github.com/allure-framework/allure-codeception/blob/1.2.6/src/Yandex/Allure/Adapter/AllureAdapter.php#L261-L270
updateTestCaseEvent
method populates the parameters of event with setParameters
call
https://github.com/allure-framework/allure-php-commons/blob/master/src/Yandex/Allure/Adapter/Annotation/AnnotationManager.php#L112
setParameters
replaces parameters, not appending them
https://github.com/allure-framework/allure-php-commons/blob/master/src/Yandex/Allure/Adapter/Event/TestCaseStartedEvent.php#L154
So if we have bot class and method annotations - parameters
generated after parsing method
annotations take precedence and drop every class
annotation impact
I think we need to involve some kind of merging here
allure-codeception 1.1.1 -> codeception/codeception 2.0
latest codeception/codeception version is 2.3.x
have problems installing
Unit test full name should be exported as string callable ofctest method.
Need someone's help to determine what should be used instead of something.
Currently following config
config:
Yandex\Allure\Adapter\AllureAdapter:
deletePreviousResults: true
outputDirectory: ../Metadata/Allure
simply deletes all results right after tests are run (or prevent them from spawning in the first place).
There is possibility i'll fix it myself and send a PR, but not sure if i'll have spare time as well
When updating codeception/codeception to version 5.0.7 and allure-framework/allure-codeception to v2.1.0, we encountered an issue with running tests. The configuration of extensions is as per GitHub.
extensions:
enabled:
- Qameta\Allure\Codeception\AllureCodeception
config:
Qameta\Allure\Codeception\AllureCodeception:
deletePreviousResults: true
outputDirectory: allure-results
ignoredAnnotations:
- env
- dataProvider
- skip
In the previous version, there was a method called _initialize responsible for initializing the extension.
/**
* {@inheritDoc}
*
* @throws ConfigurationException
* phpcs:disable PSR2.Methods.MethodDeclaration.Underscore
*/
public function _initialize(): void
{
QametaAllure::reset();
$this->testLifecycle = null;
$this->threadDetector = null;
QametaAllure::getLifecycleConfigurator()
->setStatusDetector(new StatusDetector(new DefaultStatusDetector()))
->setOutputDirectory($this->getOutputDirectory());
foreach ($this->getLinkTemplates() as $linkType => $linkTemplate) {
QametaAllure::getLifecycleConfigurator()->addLinkTemplate($linkType, $linkTemplate);
}
$this->callSetupHook();
}
In the new version, a subscription to the module event has been introduced (not an extension).
protected static array $events = [
Events::MODULE_INIT => 'moduleInit',
Events::SUITE_BEFORE => 'suiteBefore',
Events::SUITE_AFTER => 'suiteAfter',
Events::TEST_START => 'testStart',
Events::TEST_FAIL => 'testFail',
Events::TEST_ERROR => 'testError',
Events::TEST_INCOMPLETE => 'testIncomplete',
Events::TEST_SKIPPED => 'testSkipped',
Events::TEST_SUCCESS => 'testSuccess',
Events::TEST_END => 'testEnd',
Events::STEP_BEFORE => 'stepBefore',
Events::STEP_AFTER => 'stepAfter'
];
private ?ThreadDetectorInterface $threadDetector = null;
private ?TestLifecycleInterface $testLifecycle = null;
/**
* {@inheritDoc}
*
* @throws ConfigurationException
* phpcs:disable PSR2.Methods.MethodDeclaration.Underscore
*/
public function moduleInit(): void
{
QametaAllure::reset();
$this->testLifecycle = null;
$this->threadDetector = null;
QametaAllure::getLifecycleConfigurator()
->setStatusDetector(new StatusDetector(new DefaultStatusDetector()))
->setOutputDirectory($this->getOutputDirectory());
foreach ($this->getLinkTemplates() as $linkType => $linkTemplate) {
QametaAllure::getLifecycleConfigurator()->addLinkTemplate($linkType, $linkTemplate);
}
$this->callSetupHook();
}
That’s why the extension is not being initialized in the test and fails with an error. How should the extension be configured correctly for it to work?
[Qameta\Allure\Exception\OutputDirectoryUndefinedException]
Output directory is not set for Allure. Please call Qameta\Allure\Allure::setOutputDirectory() method before accessing Allure lifecycle object.
Describe the bug
👋
I’ve got a question related to connecting Allure adapter for Codeception (v 1.5.2). I’ve set it up for the project (followed same settings as it’s shown for demo project on Github) (see screenshot #1), but it looks that it doesn’t really fetch test result data from .XML file generated under allure-results folder (see screenshot #2). The .xml itself has all the steps and failure details, while the report misses all this data, except the one indicated within Codeception’s report.xml - Cest name and status. (see screenshot #3)
What could be wrong here? Should I somehow manipulate with outputDirectory for that?
Configs for Allure are stored in acceptance.suite.yml :
actor: AcceptanceTester
step_decorators:
- \Codeception\Step\Retry
- \Codeception\Step\TryTo
extensions:
enabled:
- Yandex\Allure\Codeception\AllureCodeception
- Codeception\Extension\Recorder
- Codeception\Extension\Logger
config:
Yandex\Allure\Codeception\AllureCodeception:
deletePreviousResults: true
outputDirectory: allure-results
ignoredAnnotations:
- env
- dataprovider
- skip
The command for running tests:
docker-compose exec tests codecept run acceptance BrandAmbassadorCest --env chrome --steps --xml --html
The command for running Allure server locally:
allure serve tests/_output
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Test body should include all test execution steps and screenshots generated by Codeception.
Screenshots
Screenshots available here on Imgur
Additional context
I've contacted Codeception community on their Slack channel regarding that issue and they have referred me to your repo.
Hi!
We are using allure-framework/allure-codeception
And we see that in every Cest you need to use Annotations classes, like
use Yandex\Allure\Adapter\Annotation\Title;
use Yandex\Allure\Adapter\Annotation\Description;
... etc
May be we can somehow 'globally' use/autoload this classes and do not write them every time?
Appreciate any ideas, thanks
Codeception v5 is now released so we should aim to support it
Codeception is designed to isolate user from particular version of PHPUnit used under the hood, but for historical reason we still use PHPUnit to test our integration, and even more - to set up failure status. We must remove this unnecessary dependency.
Could you please provide an update for compatibility with Codeception 2.2 ?
There is a general mechanism used by Allure adapters to run tests selectively. It uses a test plan - a .json file with the following schema:
{
"type": "object",
"properties": {
"tests": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"selector": { "type": "string" }
}
}
}
}
}
A path to a test plan is provided as a value of the ALLURE_TESTPLAN_PATH
environment variable.
If a valid test plan file is provided, only matched tests should be run. A test is matched if there is at least one entry in the tests
array, such that:
id
property is present in the entry AND the test has an Allure ID (added via the allure_id
or as_id
label), the id
property must be the same as the Allure ID of the test, ORselector
property is present in the entry, it must be the same as the test's fullName
.Test plan support allows selective runs from TMS (e.g., TestOps). Ideally, the mechanism should be supported by all Allure adapters.
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <"> at index 0: "OK"
Error occurs when calling allure serv
allure-codeception 1.4.0
codeception 3.0.2
allure 2.12.1
Hi,
is there any specific reason to insist on Codeception version 2.0.0? Maybe we could move forward to actual on (2.0.5): https://github.com/allure-framework/allure-codeception/blob/master/composer.json#L20
Hey guys,
we're planning to go on php8.
So, composer why-not php 8
tells me
jms/serializer 1.14.1 requires php (^5.5|^7.0)
That's because
allure-framework/allure-codeception require "allure-framework/allure-php-api": "~1.2.1"
and allure-framework/allure-php-api require "jms/serializer": "^0.16 || ^1.0"
Do we have any plans to make support of newer versions allure-framework/allure-php-api (that supports jms/serializer upper versions)?
I have simple Codeception Acceptance testcase (I'll include code letter).
I ran the test and generate report via command:
C:\Users\ognezdyonova\workspace\InvoiceCentralCodeception>allure generate -v 1.4.1 C:\Users\ognezdyonova\workspace\InvoiceCentralCodeception\allure-results
But in the report itself I can't see the Step names or method names only text "Step" which makes this report useless.
I attached screenshot.
Code of testcase:
wantTo('Test ACH Payments'); $I->icACHDbUpdate($I, ACHPaymentData::$icUname); /** - Login to IC with Helper Class - Validating the Open Invoice page */ $I->icLogin($I, ACHPaymentData::$icUname, ACHPaymentData::$icPwd); /** - Test Scenario 1: Add bank account via plaid throw payment process. */ $I->wantTo('Test Scenario 1: Add bank account via plaid throw payment process.'); $I->checkOption(['xpath' => '//input[@value="'.ACHPaymentData::$selectInvoice1.'"]']); $I->click(['xpath' => OpenTabPage::$ic_paySelectedBtn]); $I->waitForText('Number of Invoices:'); $I->selectOption('form select[name=payment_paymentAccount_'.ACHPaymentData::$selectInvoice1.']', ACHPaymentData::$achAddNewAccount); $I->waitForText('Option One: Select your bank', 2); //Select Bank from the list $I->icSelectBank($I, PlaidACHPage::$ic_bankOfAmerica); $I->waitForText('Log in', 2); //Login to the bank account $I->icLoginBank($I, PlaidACHPage::$ic_plaidUser, PlaidACHPage::$ic_plaidPwd); $I->waitForText('Verify Account'); //Verify MFA question $I->icMfaQuestion($I, PlaidACHPage::$ic_plaidResponse); $I->waitForText('Choose Accounts', 2); //Select Primary Checking Account $I->icSelectPrimaryChecking($I, PlaidACHPage::$ic_regularChecking1, PlaidACHPage::$ic_regularChecking1); $I->fillField(['xpath' => '//input[@id="payment_paymentAmount_'.ACHPaymentData::$selectInvoice1.'"]'],ACHPaymentData::$selectAchAmount1); $I->icAddMemoQuick($I, CCPaymentData::$row, ACHPaymentData::$memo); $I->click('Next'); // Verify the correct payment amount is showing as Total Amount in Authorization and Confirmation page $I->icVerifyTotalAmount($I, ACHPaymentData::$selectAchAmount1); $I->wait(2); $I->click('close'); // Verify that we are navigating back to the Home page after successful payment and then Cancel the payment $I->icCancelPayment($I); // Delete CC payment account $I->icDeleteACHPayAccount($I, ACHPaymentData::$icUname); ![2015_04_22_16_10_46_allure_dashboard](https://cloud.githubusercontent.com/assets/7072308/7284254/608b0e04-e90a-11e4-8018-cf5886b6bf47.jpg)A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.