Comments (10)
Per-project .unitTestGeneratorConfig now available in 0.105 👍
from unitverse.
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.
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.
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.
.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.
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.
@marbel82 - Preview of the UI
For controlling options (other two pages have a similar look):
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.
Cool! 👍
from unitverse.
@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.
Closing for now - thanks for the issue ❤
from unitverse.
Related Issues (20)
- XML comments not generated for subsequent generated tests HOT 8
- Support for Shouldly HOT 7
- Option to split naming convention for mock vs non-mock dependency fields HOT 2
- Feature Request: add InternalsVisibleTo when creating tests for internal classes HOT 2
- Add filtering to all pages of the generation dialog HOT 1
- Update documentation after generation dialog changes & addition of persistent project mappings
- Small bug with nested code files HOT 18
- Exception generating tests with code in nested files HOT 6
- "Goto Tests" menu item in editor window not working? HOT 24
- Add Async suffix to asynchronous methods HOT 2
- Maybe consider ordering generated tests alphabetically HOT 2
- Fixed bug in issue # 106 is still occurring HOT 7
- Add ability to skip internal types when generating for multiple types HOT 4
- I want to change the text in Assert.Fail HOT 2
- Add Assert for var result HOT 2
- Support more formatted output
- Report some errors HOT 2
- Partail Class Error: Syntax Node is not within syntax tree HOT 10
- Support option to prefer generation of Constructor/Disposable HOT 5
- NUnit - Omit generating [TestFixture] attribute HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unitverse.