Skip to content

Support for behave which is running on parallel mode - now allure-results directory is creating empty. #321

Closed

Description

@testingplusme

I'm submitting a ...

  • bug report
  • [] feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

When I'm using behave from this branch behave/behave#710 (where is possible to use behave in the parallel mode) directory allure-results is creating empty.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

I used this command
behave --processes 3 --parallel-element feature -f allure_behave.formatter:AllureFormatter -o allure_test_results ./features

and after run this folder is creating but empty when I'm using behave without --processes 3 --parallel-element feature that allure-results directory is creating correctly.

What is the expected behavior?

That Allure works in other forks when there is parallel support so it will be very helpful to have this possibility also for behave.

What is the motivation / use case for changing the behavior?

Parallel run of tests is one of the most important thing in my opinion because always we want to decrease execution time.

Please tell us about your environment:

  • Allure version: 2.8.0
  • Test framework: behave 1.2.7.dev0
  • Allure adaptor: allure-behave@2.5.4

Activity

  1. yuriandreyev commented on Jan 24, 2019

    @yuriandreyev

    We use this Behave-Allure adapter https://pypi.org/project/allure2-behave/ https://github.com/DaulGitHub/allure-behave
    Allure report is successfully generated even if behave tests were run in parallel mode.

  2. testingplusme commented on Jan 24, 2019

    @testingplusme
    Author

    @yuriandreyev thank you. Is it also possible to have access to allure.attach() method? Or maybe you have any wrapper method for it?

  3. added a commit that references this issue on Jan 24, 2019
    5e9128b
  4. DauletMavlonazarov commented on Jan 28, 2019

    @DauletMavlonazarov

    @yuriandreyev thank you. Is it also possible to have access to allure.attach() method? Or maybe you have any wrapper method for it?

    @testingplusme code example how to use attachments https://github.com/DaulGitHub/allure-behave/blob/master/example/features/environment.py

  5. sseliverstov commented on Jan 28, 2019

    @sseliverstov
    Contributor

    @testingplusme hi, can you check this issue with v2.5.5? Tnx!

  6. testingplusme commented on Jan 28, 2019

    @testingplusme
    Author

    @DaulGitHub thanks for your reply.
    @sseliverstov Thank you. I tried it. Unfortunately, still it's creating empty folder :( Ofc, I used the new version of allure-behave and allure-python-commons and behave from branch behave/behave#616 .

  7. sseliverstov commented on Jan 28, 2019

    @sseliverstov
    Contributor

    @testingplusme python version?

  8. testingplusme commented on Jan 28, 2019

    @testingplusme
    Author
  9. testingplusme commented on Feb 5, 2019

    @testingplusme
    Author

    @sseliverstov Did you look at ? ^ ^

  10. Ljancek commented on Feb 5, 2019

    @Ljancek

    I have some issue with

    • python: 2.7.15,
    • allure-behave: 2.5.5,
    • allure-python-commons: 2.5.5
    • behave: 1.2.7.dev0 from behave/behave#616
  11. 18 remaining items

  12. added a commit that references this issue on Nov 18, 2020
    0c1ee01
  13. Khouloud-moalla commented on May 24, 2022

    @Khouloud-moalla

    We use this Behave-Allure adapter https://pypi.org/project/allure2-behave/ https://github.com/DaulGitHub/allure-behave Allure report is successfully generated even if behave tests were run in parallel mode.

    I did not find a result ! Can you help me more !

  14. DauletMavlonazarov commented on May 25, 2022

    @DauletMavlonazarov

    We use this Behave-Allure adapter https://pypi.org/project/allure2-behave/ https://github.com/DaulGitHub/allure-behave Allure report is successfully generated even if behave tests were run in parallel mode.

    I did not find a result ! Can you help me more !

    Please run tests as in the example https://github.com/DaulGitHub/allure-behave/tree/master/example
    As a result, the folder allure-report should appear. https://github.com/DaulGitHub/allure-behave/blob/master/example/features/environment.py#L10

    If folder not appeared please write me.

  15. Khouloud-moalla commented on May 26, 2022

    @Khouloud-moalla

    Daul I want this
    Generate reports with allure behave: My Test will be executed on several browsers in parallel so when I generated the report i will have two reports but whithout the name of browser in file.json . What I want doing to know which report belongs to which browser !! heelp me please

  16. DauletMavlonazarov commented on May 26, 2022

    @DauletMavlonazarov

    Daul I want this Generate reports with allure behave: My Test will be executed on several browsers in parallel so when I generated the report i will have two reports but whithout the name of browser in file.json . What I want doing to know which report belongs to which browser !! heelp me please

    You should change output report directory name https://github.com/DaulGitHub/allure-behave/blob/master/example/features/environment.py#L10 for every test run.
    for example: report_dir_name = "allure-report-firefox"
    report_dir_name = "allure-report-chrome" etc

    I hope it will help you.

  17. Khouloud-moalla commented on May 26, 2022

    @Khouloud-moalla

    I want that the name of browser to be written automaticcaly in report.json file generated right after every test and for every test the browser is not always the same !!

  18. DauletMavlonazarov commented on May 26, 2022

    @DauletMavlonazarov

    Just change variable report_dir_name for every test run. I do not see problem.
    May be I didn`t fully understand the task.

  19. Khouloud-moalla commented on May 26, 2022

    @Khouloud-moalla

    ok i will try to explain more: i'm generating my reports with this command
    sh('SET CONFIG_FILE=config/%s.json & SET TASK_ID=%s & behave -f allure_behave.formatter:AllureFormatter -o reports features/project.feature ' % (config, task_id, feature3))
    it executes tests in 2 different browsers in paralell and for every browser it generates a .json report file .
    My problem is i want to know each .json file belongs to which browser and i want to add the name of the browser in the .json file

  20. DauletMavlonazarov commented on May 27, 2022

    @DauletMavlonazarov

    ok i will try to explain more: i'm generating my reports with this command sh('SET CONFIG_FILE=config/%s.json & SET TASK_ID=%s & behave -f allure_behave.formatter:AllureFormatter -o reports features/project.feature ' % (config, task_id, feature3)) it executes tests in 2 different browsers in paralell and for every browser it generates a .json report file . My problem is i want to know each .json file belongs to which browser and i want to add the name of the browser in the .json file

    Ok, I understand problem.

    1. We are talking about two different repository. You mean this repository https://github.com/allure-framework/allure-python, but I mean this repository https://github.com/DaulGitHub/allure-behave. It is two different repositories and different different methods for generating a report
    2. you misled me with a quote in this question Support for behave which is running on parallel mode - now allure-results directory is creating empty. #321 (comment)
      Do you see, it is my alternative repository https://github.com/DaulGitHub/allure-behave
    3. Now to solve your question you have to ask a question or create issue in this repository https://github.com/allure-framework/allure-python

    Regards Daulet!)

  21. Khouloud-moalla commented on May 27, 2022

    @Khouloud-moalla

    2. you misled me with a quote in this question

    I'made my issue in the repository which say to me but without any response :( 3 days without any help and any response

  22. DauletMavlonazarov commented on May 27, 2022

    @DauletMavlonazarov

    3 days without any help and any response

    It is sad!

    1. you can ask the question in the Allure framework community https://qameta.io/allure-report/ Push on a button "community".
    2. Also you can use my repository https://github.com/DaulGitHub/allure-behave , but I do not use it long time.

    I wish you good luck!

  23. Khouloud-moalla commented on May 27, 2022

    @Khouloud-moalla

    3 days without any help and any response

    It is sad!

    1. you can ask the question in the Allure framework community https://qameta.io/allure-report/ Push on a button "community".
    2. Also you can use my repository https://github.com/DaulGitHub/allure-behave , but I do not use it long time.

    I wish you good luck!

    In any case thank you

  24. added a commit that references this issue on Apr 10, 2023
    f9ee1e3
  25. added 2 commits that reference this issue on Mar 19, 2024
    9c2c42a
    f1533b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions