+1-888-365-2779
Try Now
More in this section

Test Runner

4 posts, 0 answered
  1. Victor
    Victor avatar
    94 posts
    Registered:
    15 Jun 2011
    12 Dec 2013
    Link to this post
    I'm confused, how do I avoid a "circular reference" when using the SDK Test runner.

    Since the web app needs a reference to the test project to load the tests, but the test project needs a reference to the web app to run any custom code...

    For example how would I reference a controller from the test project?
  2. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    06 Dec 2016
    16 Dec 2013
    Link to this post
    Hi,

    The project that has tests included uses our Sitefinity API and it has references to Sitefinity, but these references are to to our DLLs, not to the SitefinityWebApp project itself. So the project with tests does not need a reference to the SitefinityWebApp to run any custom code and there won't be a circular reference.

    Regards,
    Stefani Tacheva
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Victor
    Victor avatar
    94 posts
    Registered:
    15 Jun 2011
    16 Dec 2013 in reply to Stefani Tacheva
    Link to this post
    Stefani, thanks for your response.  

    My question is if I was testing an MVC controller for example that existed inside the SitefinityWebApp itself, how would I reference it?
  4. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    06 Dec 2016
    19 Dec 2013
    Link to this post
    Hi,

    You need to build the SitefinityWebApp project and add a new reference: SitefinityWebApp dll (not the project itself) to the Test Project.

    Regards,
    Stefani Tacheva
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered