You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be to my incompetence.. but trying to run the tests after cloning wil not work..
First I had to add Nunit.framework to the projects, to make it compile.
Now it throws an exception about some filepath it can't find..
Maybe you should seperate the preformance tests from the unit tests?
To my understanding UnitTests should not be dependend on external sources, of any kind.
Not your fault. I appear to have broken something related to the test path config, they don't work in NUnit any more. You should still be able to run them in Visual Studio with MSTest. I'll get this fixed shortly.
The test configuration is a little tricky because many of them depend on HTML files. You are right, the technically "correct" way to do it is to include these files as resources that are copied to the test run location. But since one of those files is 6 megabytes in size, this creates a lot of overhead to run the tests. The approach I took instead is to locate the test project source folder by traversing the path from the test run location. So for this to work depends on things being in the same relative locations as they are on github. This used to work fine in NUnit. I changed something in the code that locates the current directory which apparently works in VS but not when running via NUnit runner.
NUnit is a dependency for the test project, but as long as you have NuGet installed, it should automatically restore it, this is unrelated to the general nunit issue.
The performance tests are kind of a separate issue, and probably you're right that they should be separated. They don't have different dependencies from the rest of the tests but they do take a long time and also produce output. I'll try to get this done sometime in the near future. (I already have a separate project for running them in a non-test context so seems a no brainer that they should just be removed from the test project entirely.. just hard to keep up with everything :)
OK it's fixed in master now. I understand the confusion about the dependencies in the test project now, I forgot they also depend on HAP & Fizzler, of course. I has started to clean things up there not too long ago and left it unfinished. That is, while I switched the NUnit dependency to nuget, I left the others in the "redist" folder which really doesn't make a lot of sense. I am going to do as you suggest and move the perf tests to a separate project which will also mean that the only dependency of CsQuery.Tests is NUnit..
Activity
jamietre commentedon Aug 8, 2012
Not your fault. I appear to have broken something related to the test path config, they don't work in NUnit any more. You should still be able to run them in Visual Studio with MSTest. I'll get this fixed shortly.
The test configuration is a little tricky because many of them depend on HTML files. You are right, the technically "correct" way to do it is to include these files as resources that are copied to the test run location. But since one of those files is 6 megabytes in size, this creates a lot of overhead to run the tests. The approach I took instead is to locate the test project source folder by traversing the path from the test run location. So for this to work depends on things being in the same relative locations as they are on github. This used to work fine in NUnit. I changed something in the code that locates the current directory which apparently works in VS but not when running via NUnit runner.
NUnit is a dependency for the test project, but as long as you have NuGet installed, it should automatically restore it, this is unrelated to the general nunit issue.
The performance tests are kind of a separate issue, and probably you're right that they should be separated. They don't have different dependencies from the rest of the tests but they do take a long time and also produce output. I'll try to get this done sometime in the near future. (I already have a separate project for running them in a non-test context so seems a no brainer that they should just be removed from the test project entirely.. just hard to keep up with everything :)
jamietre commentedon Aug 8, 2012
OK it's fixed in master now. I understand the confusion about the dependencies in the test project now, I forgot they also depend on HAP & Fizzler, of course. I has started to clean things up there not too long ago and left it unfinished. That is, while I switched the NUnit dependency to nuget, I left the others in the "redist" folder which really doesn't make a lot of sense. I am going to do as you suggest and move the perf tests to a separate project which will also mean that the only dependency of CsQuery.Tests is NUnit..
jamietre commentedon Aug 8, 2012
Done
petterek commentedon Aug 9, 2012
Nice work... :)