Giter VIP home page Giter VIP logo

Comments (7)

thePantz avatar thePantz commented on June 13, 2024 1

The solution to this is the following:

public class XUnitLogger : AbstractLogger
{
      private readonly ITestOutputHelper output;

      public XUnitLogger(ITestOutputHelper output, LogSeverity severity = LogSeverity.Trace)
          :base(severity)
      {
          this.output = output;
      }

      public override void Close()
      {
          // This logger needs no closing
      }

      protected override void LogRaw(string message, LogSeverity severity = LogSeverity.Info)
      {
          if(severity >= LowestSeverity)
              output.WriteLine(message);
      }
}

public class MyTest
{
        private readonly ITestOutputHelper output;
        public MyTest(ITestOutputHelper output)
        { 
            this.output = output;
        }

        [Fact]
        public void EditIcon_ShouldPutRowInEditMode()
        {
            var test = new Actor("Customer", new XUnitLogger(output));
        }
}

Given the recent architecture changes, where should I place this? At first I considered placing this under Boa.Constrictor.Screenplay however it would require adding an xUnit dependency. Would it be more appropriate to start a Boa.Constrictor.xUnit project?

from boa-constrictor.

AutomationPanda avatar AutomationPanda commented on June 13, 2024 1

@thePantz feel free to fork the repository, get working, and send a pull request!

from boa-constrictor.

AutomationPanda avatar AutomationPanda commented on June 13, 2024

@thePantz, this is good stuff. You're absolutely right about the dependency issue. I think I agree with your assessment that we'd want a separate project and package for xUnit to support this.

My questions for you:

  • Is this something you'd want to do?
  • Do you want this to be part of the main Boa Constrictor repository?

I'd love to collaborate with you on this if you're up for the challenge!

from boa-constrictor.

thePantz avatar thePantz commented on June 13, 2024

Yes! I would be happy to contribute! I figure it's a general enough use case that will be useful to others.

Although, I noticed #20 the other day and was wondering if this is still valuable or if it will soon be obsolete

from boa-constrictor.

AutomationPanda avatar AutomationPanda commented on June 13, 2024

#20 is still valid but not planned at the moment. I'd say move forward with this xUnit logger for now. We can change things in the future.

from boa-constrictor.

AutomationPanda avatar AutomationPanda commented on June 13, 2024

(I'm here to answer questions and offer help along the way if you need it, too!)

from boa-constrictor.

AutomationPanda avatar AutomationPanda commented on June 13, 2024

This work was completed as part of #248 !

from boa-constrictor.

Related Issues (20)

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.