Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fake should be able to split a MSBuild-project into a test and implementation project #4

Closed
forki opened this issue Jul 2, 2010 · 6 comments

Comments

@forki
Copy link
Member

forki commented Jul 2, 2010

Consider a project with side-by-side specification:

Name: MyProject.csproj
Dependency on NUnit.Framework.dll
Class1.cs
Test.Class1.Something.cs
Test.Class1.Whatever.cs
Class2.cs
Test.Class2.Something.cs

This side-by-side specification is good for development, but for a release build we want to split this into two separate projects like this:

Name: MyProject.csproj
Class1.cs
Class2.cs

Name: Test.MyProject.csproj
Dependency on NUnit.Framework.dll
Dependency on MyProject.csproj
Test.Class1.Something.cs
Test.Class1.Whatever.cs
Test.Class2.Something.cs

The splitting should work for all testprojects and based on file name conventions.

@ilkerde
Copy link
Contributor

ilkerde commented Jul 2, 2010

I don't know fake's functionality, so bare with me on that. However, I'd recommend to split the feature into smaller chunks and implement filtering first. In the context of a release build, the benefit of having specifications packaged is rather small. I wouldn't drop the idea entirely though, just postpone it. IMHO it's good enough for a first shot to just filter out the specs using conventions.

Conventions may differ for different spec. frameworks, so filter criteria needs to be adjustable.

Once the filter (for files and test dll's) is done, you soon will recon the need for a "boarding" build. But for the sake of simplicity, filter would satisfy a lot!

This feature would be one more great reason to switch over to fake. I'll surely have a look! Thanks!

@AlexZeitler
Copy link
Contributor

I agree with Ilker - there's no need to elaborate ;-)

@panesofglass
Copy link
Contributor

Interesting. I've never thought of the need for this before. Why aren't you already using separate projects?

@forki
Copy link
Member Author

forki commented Jul 6, 2010

Hi Ryan,

we had an interesting discussion about side-by-side specifications at the .NET OpenSpace in Karlsruhe. The idea is to put specs, test data and implementation next to each other since the specs are documentation for the implementation.

By using a tool like http://mokosh.co.uk/vscommands/ we are able to group the implementation with the specs (see http://gist.github.com/457248).

But of course we don't want to deploy the tests. By automatically removing all spec files and test framework references we can easily build a release.

What do you think?

Regards,
Steffen

@panesofglass
Copy link
Contributor

I love it. I had thought about that at one point, but I've now gotten so used to having completely separate folder structures/projects for tests/specs. I'd love them to be together again, though. Great idea!

@forki
Copy link
Member Author

forki commented Jul 11, 2010

First version in 1.33.0 released

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants