Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapter get incorrect test's method name, coz dataProvider #30

Closed
rothaarNatalia opened this issue Apr 2, 2015 · 8 comments
Closed

Comments

@rothaarNatalia
Copy link

If test uses dataProvider
Adapter get incorrect test's method name
http://screencast.com/t/DJRchcoc5x

@rothaarNatalia
Copy link
Author

/**
 * Gets the name of a TestCase.
 *
 * @param  boolean $withDataSet
 * @return string
 */
public function getName($withDataSet = true)
{
    if ($withDataSet) {
        return $this->name . $this->getDataSetAsString(false);
    } else {
        return $this->name;
    }
}

@vania-pooh
Copy link
Contributor

@rothaarNatalia any thoughts how to fix this? Probably I'm using some incorrect call in my adapter class.

@rothaarNatalia
Copy link
Author

SuiteName incorrect too. TestCase with dataProvider is considered as TestSuit, as I've understand.
It helps me
Change in AllureAdapter.php
public function startTest(PHPUnit_Framework_Test $test)
instead Annotation\AnnotationProvider::getMethodAnnotations($suiteName, $methodName)
to use Annotation\AnnotationProvider::getMethodAnnotations(get_class($test), $methodName)
Work with and without provider

But I've another issue
build\allure-results <-- here my tests result, I try to generate report using allure-cli
allure report generate absolutePath\build\allure-results

and received such error
http://screencast.com/t/8in665es
folder with reports (allure-results)
https://yadi.sk/d/6uuPUJMSfwivv

@vania-pooh
Copy link
Contributor

@Djamiyo any thoughts?

@ghost
Copy link

ghost commented Apr 14, 2015

@vania-pooh Ok, I'll try to figure out the reason tonight.

@ghost
Copy link

ghost commented Apr 14, 2015

It looks like we have some problems with design. Test suite, being started inside another one, overwrites it's uuid, so the parent suite could never be finished. If we can't have suite inside another suite in Allure report, I think we should look for suite in storage by name, then get uuid and fire events for appropriate one. So we will get 2 different suites in report. But the problem needs further discussion.

@vania-pooh
Copy link
Contributor

@Djamiyo Allure does not support nested suites. We expect an unlimited list of suites with unlimited set of cases and steps inside.

tyz910 added a commit to tyz910/allure-phpunit that referenced this issue Jul 27, 2015
vania-pooh pushed a commit that referenced this issue Jul 27, 2015
Adapter get incorrect test's method name, coz dataProvider #30
@tyz910
Copy link
Contributor

tyz910 commented Aug 7, 2015

Fixed in #32. I think we can close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants