Giter Club home page Giter Club logo

selenide-allure-junit's Introduction

Selenide + Allure + JUnit example

To run tests and generate Allure report:

  • run mvn clean test

To access the report manually:

  1. Generate the report by running: mvn allure:report
  2. Use an HTTP server to expose the content of target/site/allure-maven-plugin/
    In Intellij IDEA, you can access the report by opening target/site/allure-maven-plugin/index.html in the Web Browser.

To access the report automatically:

To Generate and open the report in your default browser at:

  • Random port, run: mvn allure:serve
  • Specific port, run: mvn allure:serve -Dallure.serve.port={your_port}

Build Status

selenide-allure-junit's People

Contributors

asolntsev avatar borisosipov avatar dependabot[bot] avatar loordbarringtn avatar oussamabadr avatar pmverma avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

selenide-allure-junit's Issues

Скриншоты в отчетах

Доброго времени суток. Попробовал ваш атач для своих тестов, но у меня не прикрепляются скриншоты в отчете. Код своих тестов смогу приложить только в понедельник. Спасибо.

How to add custom step that the step details is the URL

Dear @asolntsev ,
I running Allure with Selenide in Gradle against Selenoid browser hub, as you know, Selenoid provide the video recording function, so I would like to attach the video URL when the test case failed in allure.
From the sample: https://github.com/allure-framework/allure-java/blob/b600f7b1d9fbbf81a8efa1f072d0af218530eb46/allure-selenide/src/test/java/io/qameta/allure/selenide/AllureSelenideTest.java#L70-L77

and my code is in @AfterMethod of TestNG:

SelenideLog log = SelenideLogger.beginStep("testing", "\nTest video: " + videoUrl + "\nTest logs: " + logUrl);
                SelenideLogger.commitStep(log, LogEvent.EventStatus.FAIL);

and finally, I got the report layout is:
image

it looks not good, could you advise how I can present the video link/log link better?
Thanks.

allure+selenide+testng

Hi there
I can't add a listener when I use testNG with selenide, what is the alternative for this line to add a listener:
SelenideLogger.addListener("AllureSelenide", new AllureSelenide().screenshots(true).savePageSource(false));

Clear cache after test ends to prevent same user login again

Hi I have a test where different users login and different points in the same test. I also have 2 tests where the login user is different. What is happening is, when the driver quits after an assertion failure and tries to login again for the next test, it logs in with the previous user. What can be done to clear the cache after the driver quits?

OS: MacOs
Chrome Driver: 101.0.4951.41
Selenide: 6.4.0

ChromeDriver is not started when running tests form command line

Hi all,
I've faced a problem when I run tests form this example form command line 'mvn clean test' no ChromeDrivers were run

[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.selenide.examples.GoogleSearchTest
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port 39783
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
авг. 02, 2020 10:35:47 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C

after this line, nothing is happened for 1 or 2 min and then

[ERROR] Tests run: 6, Failures: 1, Errors: 2, Skipped: 2, Time elapsed: 37.161 s <<< FAILURE! - in org.selenide.examples.InternetBankTest
[ERROR] userCanLoginToBspbDemo(org.selenide.examples.InternetBankTest) Time elapsed: 16.083 s <<< FAILURE!
com.codeborne.selenide.ex.ElementNotFound:

When I'm running tests for IDE it's working fine.

Could you please tell me what is wrong?

BR
Oleksandr

Screenshots between Allure steps

Уважаемый Андрей!
Хотел бы спросить насчет данного кода:

>   @Attachment(type = "image/png")
>   public byte[] screenshot() throws IOException {
>     File screenshot = Screenshots.getLastScreenshot();
>     return screenshot == null ? null : Files.toByteArray(screenshot);
>   }

Есть задача сделать скриншоты между шагами Алюра.
Если просто данный метод screenshot(); расставить между шагами, то скриншотов реально в отчёте Allure нет:
Screenshot 2020-05-23 at 00 03 37

Пришлось делать так:

    public void makeScreenshot(String fileName) {
        try {
            Allure.addAttachment(fileName + ".png", new FileInputStream(screenshot(fileName+getCurrentDateAndTime())));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }}

Как можно сделать максимально правильно, чтобы скриншоты появлялись между шагами Алюра? Почему Ваш метод скриншотов не добавляет? (был бы благодарен за объяснение)
Спасибо заранее!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.