Code Monkey home page Code Monkey logo

Comments (5)

eselje avatar eselje commented on September 16, 2024

from foxunit.

mikepotjer avatar mikepotjer commented on September 16, 2024

Which is probably why NUnit, XUnit, and MSTest all support this. :-)
https://xunit.github.io/docs/comparisons

from foxunit.

cwollenhaupt avatar cwollenhaupt commented on September 16, 2024

The test case class and a private data session are instantiated every time a test method is called. Init and Destroy currently fire for every test (and even every data point with the new theory support). xUnit has a test fixture concept which is a separate object that is assigned to every instantiated test object. However, this would work for objects only. It wouldn't provide shared cursors which are more likely to take a long time.

My first instinct would be that if the test setup is taking a lot of time, the test is either not a unit test, but an integration test, or it's testing more than a class. Most of my test use mocked objects and mocked cursors instead of actual tables. SQL Server access and web services run through mocked client objects that validate that the query is correct, but don't actually connect to the server.

from foxunit.

mikepotjer avatar mikepotjer commented on September 16, 2024

Sorry, Christof is correct. I've been studying TDD from Kent Beck's book and dotNET resources, so I ASSUMED FoxUnit worked the same way. But I wasn't thinking about data sessions, which Java and dotNET languages don't have. Since my suggestion won't work as described, I will close this issue.

I am also using mock objects and cursors, and testing a single class. But this is a 20 year old project which relies heavily on the Maxframe framework for various features. Performance isn't bad, but I thought there was room for improvement in areas where I have to work around a number of framework dependencies.

from foxunit.

eselje avatar eselje commented on September 16, 2024

from foxunit.

Related Issues (17)

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.