Giter VIP home page Giter VIP logo

Comments (10)

mattwhitfield avatar mattwhitfield commented on May 30, 2024 1

Per-project .unitTestGeneratorConfig now available in 0.105 👍

from unitverse.

mattwhitfield avatar mattwhitfield commented on May 30, 2024

So in order to control which test project is selected you can configure a .unitTestGeneratorConfig file, even on a per-solution basis if you want. So you could have something like TestProjectNaming={0}.SpongeBob (where {0} is the name of the source project). That should enable you to account for the many different patterns automatically.

I have tended to try and avoid the whole 'pop up a dialog box for each generation' as I find that really gets in the way of the flow. That being said - perhaps if you held down Control while clicking on the menu item it could show a configuration dialogue?

With the case for generating an integration test - what would you want to see? Obviously Unitverse sets up mocks etc - so I'd like to understand some more about what you would want there. I'd like to keep this issue about 'control which project a test is generated in' - would you mind opening another issue along with some detail of what you'd like to see for the integration tests and then I can think about whether it makes sense for Unitverse?

Thanks for the issue!

from unitverse.

mattwhitfield avatar mattwhitfield commented on May 30, 2024

Another thought - I could potentially add a 'show configuration per generation' option which would have the values 'never', 'always' and 'when ctrl is pressed'.

Then you could configure it to behave how you wanted. I would probably show a dialog that let you select the target project from a drop down (and would remember the target project per source project for that VS session). I would also let you choose test/mock/assertion frameworks.

Would that work?

from unitverse.

marbel82 avatar marbel82 commented on May 30, 2024

That's exactly the option I was thinking of - 'show configuration per generation'.
You're right that the pop-up window is annoying, but sometimes it is necessary (would be useful).

I'm not sure if the solution of holding Ctrl will be convenient, but you can try it.

What would I like in this window? hmm
In NUnit Visual Studio Test Generator there was a combobox, but it was a little annoying to have to scroll and search for a project, because we have 12 test projects.

There could be a drop down, and it would be nice if it was a little higher after opening.


In my case .unitTestGeneratorConfig would be usefull if it could be configured per-project.

from unitverse.

mattwhitfield avatar mattwhitfield commented on May 30, 2024

.unitTestGeneratorConfig would be usefull if it could be configured per-project.

I thought I might be able to do that quite simply - but it's actually not very easy.

So I will get on this - but it will take some time to get right.

from unitverse.

mattwhitfield avatar mattwhitfield commented on May 30, 2024

I'm going to do this in two parts. I have written the code for the ability to have a .unitTestGeneratorConfig per-project, which lays some of the groundwork that would be needed for the dialog box. I need to do some more testing on it, but will release that first, then add the UI portion separately.

I'm considering whether it would be useful to be able to change all the options - so effectively having the dialog with 4 tabs (Target Project, Generation Options, Strategy Options, Naming Options). That way if you just want to change the target project, you just pick the target project and click OK. If you want to change other stuff, you can. Would appreciate your thoughts 👍

from unitverse.

mattwhitfield avatar mattwhitfield commented on May 30, 2024

@marbel82 - Preview of the UI

For selecting projects:
image

For controlling options (other two pages have a similar look):
image

I have a bunch more to do on it, but just wanted to know if that looked like the right sort of thing

from unitverse.

marbel82 avatar marbel82 commented on May 30, 2024

Cool! 👍

from unitverse.

mattwhitfield avatar mattwhitfield commented on May 30, 2024

@marbel82 - The UI is available in 0.106 - there's a bunch of documentation about it on https://github.com/mattwhitfield/Unitverse/blob/master/docs/configuration.md

Short version - either go to Tools->Options->Unitverse->Generation Options and set 'Show user interface' to 'Always' or hold Control while you click on 'Generate tests...' You can also set UserInterfaceMode=Always in a .unitTestGeneratorConfig file for a particular project if you want.

Let me know what you think 👍

from unitverse.

mattwhitfield avatar mattwhitfield commented on May 30, 2024

Closing for now - thanks for the issue ❤

from unitverse.

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.