Skip to content

I can't make the tests run after cloning. #31

Closed

Description

@petterek

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.

PEtter

Activity

  1. jamietre commented on Aug 8, 2012

    @jamietre
    Owner

    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 :)

  2. jamietre commented on Aug 8, 2012

    @jamietre
    Owner

    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..

  3. jamietre commented on Aug 8, 2012

    @jamietre
    Owner

    Done

  4. petterek commented on Aug 9, 2012

    @petterek
    Author

    Nice work... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions