Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6954987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:40:43+00:00 2026-05-27T14:40:43+00:00

I have following problem. I have some unit tests implemented in a foreign assebly

  • 0

I have following problem. I have some unit tests implemented in a foreign assebly which I reference in my unit test project. The unit tests are implemented as abstract classes and should by inherited (and with it “activated”) in my unit test project.

When I inherit those classes in my project, the test methods are visible to me. But for any reason they are not run by Visual Studio. When I run the tests with Galio Icarus I see a message telling “Test … cannot be found”.

When I copy the abstract test classes into my project, the tests are found and run properly.

Do you know whether there are some restrictions for the methods implementing the unit tests? It looks to me that the test executiion has a logic which not only looks for TestClassAttribute, TestMethodAttribute and so on, but also checks whether the test implementation is done in same assembly.

The implementation looks like this:

abstract class with test implementation in foreign assebly:

[TestClass]
public abstract class GeneralGridTestsBase<T> where T : GridParamsBase, new()
{
    [TestMethod]
    public virtual void GetCellSetItems_Unique_CellSetKeys()
    {
        // Test implementation
    }

    // Other tests implemented here
}

In my test project I inherit the abstract class and expect the tests to be visible and “active”.

[TestClass]
public class RetailInputGeneralTests : GeneralGridTestsBase<RetailInputParams>
{ }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:40:44+00:00Added an answer on May 27, 2026 at 2:40 pm

    I was able to replicate this and then fix it by overriding the virtual test method and calling the base implementation. It seems uneccessary but I guess it’s just an idiosyncrasy of the MSTest framework:

    [TestClass]
    public class RetailInputGeneralTests : GeneralGridTestsBase<RetailInputParams>
    { 
        [TestMethod]
        public override void GetCellSetItems_Unique_CellSetKeys()
        {
            base.GetCellSetItems_Unique_CellSetKeys()
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this strange problem in my unit tests. See the following code _pos
I have a unit test which contains the following line of code Site.objects.get(name=UnitTest).delete() and
I have the following problem with Tikz/Latex: I have some nodes that contain text.
Propose to consider the following problem. Suppose we have some composite object. Are there
i am new in JSP,i have some problem with the following code : <%@
I have some files I want to use in my unit tests but I
We have some scripts that we run as part of our unit tests. This
I am trying to write some unit tests that test the endpoints for my
I have some unit tests that use Azure Storage. When running these locally, I
I have a problematic situation with some quite advanced unit tests (using PowerMock for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.