Selenium with C# | Extent Report

Поділитися
Вставка
  • Опубліковано 1 гру 2024

КОМЕНТАРІ • 36

  • @omuhlemazibuko5627
    @omuhlemazibuko5627 3 роки тому +1

    THank you Thank you Thank you, I got it right this was helpful for first time I managed to create extent report very simple

  • @NikhilDarokar-m4z
    @NikhilDarokar-m4z 3 місяці тому +1

    How we can replace the default extent logo with companies logo

    • @maximumautomation
      @maximumautomation  3 місяці тому

      You can customise the extentreport.config and change the logo file path. Then use the same file while initialising the extent report.

    • @NikhilPodShorts
      @NikhilPodShorts 3 місяці тому +1

      ​@@maximumautomationCould you please explain in any videos so it could help people

    • @maximumautomation
      @maximumautomation  3 місяці тому

      I hope this is gonna help you.
      ua-cam.com/video/6inO_Jf_TJY/v-deo.html

  • @kelzer1
    @kelzer1 2 роки тому +1

    Nice video, works for me. One question - how can I get the steps to show the correct number as you have 6 steps in your scenario but the current implementation shows only 1 step in the report? You seem to assign step = scenario in the [BeforeStep] hook which I think causes this. I would like the report to show 6 steps. Many Thanks

    • @maximumautomation
      @maximumautomation  2 роки тому

      This is the limitation from extext report. It identify feature file as test and scenarios as steps.

  • @omuhlemazibuko5627
    @omuhlemazibuko5627 3 роки тому +1

    Hi, on my side Im getting this exception what could be the problem please help Im busy with work project : OneTimeSetUp: BoDi.ObjectContainerException : Multiple public constructors with same maximum parameter count are not supported! System.Globalization.CultureInfo (resolution path: TechTalk.SpecFlow.FeatureContext->TechTalk.SpecFlow.FeatureInfo)

    • @maximumautomation
      @maximumautomation  3 роки тому

      @Omuhle Mazibuko, looks like you're passing incorrect parameter into to the Specflow hooks methods. Please check if parameters are correct on all the hook methods.
      E.g.
      [BeforeScenario]
      public void BeforeScenario(Context context)

  • @mzamomahaeng268
    @mzamomahaeng268 2 роки тому +1

    thank you for the git code. It helped me so much

  • @anhvunguyen6193
    @anhvunguyen6193 3 роки тому +1

    Hi.
    I used same exactly :
    static string reportPath = System.IO.Directory.GetParent(@"../../../").FullName
    + Path.DirectorySeparatorChar + "Reports"
    + Path.DirectorySeparatorChar + "Report_" + DateTime.Now.ToString("ddMMyyyy HHmmss");
    But I only get the 'Reports' folder and index.html file in this folder.
    I'm using Selenium C#
    Please help. Thank you.

  • @viiitu
    @viiitu 2 роки тому +1

    i need help my project dosent works, have any git repository for download this code?

    • @maximumautomation
      @maximumautomation  2 роки тому +2

      @Vitor
      Please see below link for same.
      github.com/MaximumAutomation/seleniumnunit

  • @chinmayk2657
    @chinmayk2657 3 місяці тому

    Multiple test cases in one extent report

  • @vishalmalik5312
    @vishalmalik5312 3 роки тому

    Hi ,I have implemented extentReport however getting error while executing the script through command prompt and same script is working fine via visual studio please help why this happening.

    • @maximumautomation
      @maximumautomation  3 роки тому

      Are you using dotnet framework or dotnet core? And version?

    • @vishalmalik5312
      @vishalmalik5312 3 роки тому

      @@maximumautomation dotnet core

    • @vishalmalik5312
      @vishalmalik5312 3 роки тому

      Actually i got the issue why it is coming actually one peace of code showing error. in case i am using this file path getting error : //static string configSettingPath=System.IO.Directory.GetParent(@"../../../").FullName +
      // Path.DirectorySeparatorChar + "Config/configsetting.json";

    • @vishalmalik5312
      @vishalmalik5312 3 роки тому

      static string logPath = "D:\
      ewgit\\SpecflowFramework\\UI_Script\\Result"; :--- it is working fine

    • @maximumautomation
      @maximumautomation  3 роки тому +1

      Okay. It's because System.IO.Directory returns the current working directory. IF you run it through VS then it returns different value.
      But when you run it through cmd prompt, then might be you are using some different location. Please make sure you are running the script from correct location.

  • @prabushanmugam811
    @prabushanmugam811 Рік тому

    I got broken ui extent report. Could you please help me how to fix it?

  • @omuhlemazibuko5627
    @omuhlemazibuko5627 3 роки тому

    public static void BeforeFeature(FeatureContext context1) | BeforeScenarion(ScenarioContext context2) | AfterStep(ScenarioContext context3) this is how it looks on my side axactly as your video

    • @maximumautomation
      @maximumautomation  3 роки тому

      Okay. Could you please share Specflow version which you are using?

  • @99626arun
    @99626arun 3 роки тому

    Is it possible to generate extend report in vscode?

  • @Unique_Entertainments
    @Unique_Entertainments 3 роки тому

    How to add screen shot to it

    • @maximumautomation
      @maximumautomation  3 роки тому

      Please watch below video for same.
      ua-cam.com/video/bv5yLSDI6H0/v-deo.html

    • @fathimajamal-deen8202
      @fathimajamal-deen8202 9 місяців тому

      How do i access this video @@maximumautomation

  • @MokshithP-y6o
    @MokshithP-y6o Рік тому

    subfolder is not created inside Report folder did I miss some thing ?
    [Binding]
    public class Hooks
    {
    static AventStack.ExtentReports.ExtentReports extent;
    static AventStack.ExtentReports.ExtentTest feature;
    static AventStack.ExtentReports.ExtentTest scenario,step;
    static string reportpath = System.IO.Directory.GetParent(@"../../../").FullName
    + Path.DirectorySeparatorChar + "Result"
    + Path.DirectorySeparatorChar + "Result_" + DateTime.Now.ToString("ddMMyyyy HHmmss");
    [BeforeTestRun]
    public static void BeforeTestRun()
    {

    ExtentHtmlReporter htmlreport = new ExtentHtmlReporter(reportpath);
    extent = new AventStack.ExtentReports.ExtentReports();
    extent.AttachReporter(htmlreport);
    }
    [BeforeFeature]
    public static void BeforeFeature(FeatureContext context)
    {
    feature = extent.CreateTest(context.FeatureInfo.Title);
    }
    [BeforeScenario]
    public static void BeforeScenario(ScenarioContext context)
    {
    scenario = feature.CreateNode(context.ScenarioInfo.Title);
    }
    [BeforeStep]
    public void BeforeStep()
    {
    step = scenario;
    }
    [AfterStep]
    public void AfterStep(ScenarioContext context)
    {
    if(context.TestError == null)
    {
    step.Log(Status.Pass, context.StepContext.StepInfo.Text);
    }
    else if(context.TestError != null)
    {
    step.Log(Status.Fail, context.StepContext.StepInfo.Text);
    }
    }
    [AfterFeature]
    public static void AfterFeature()
    {
    extent.Flush();
    }
    }

    • @maximumautomation
      @maximumautomation  Рік тому

      Is there any folder which got created?

    • @MokshithP-y6o
      @MokshithP-y6o Рік тому

      @@maximumautomation No only result folder inside that direct result it is displaying
      Result with date time is not created.

    • @maximumautomation
      @maximumautomation  Рік тому

      Could you please check what you are getting in variable reportpath while debugging?