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

  • SEARCH
  • Home
  • 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 6686179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:08:32+00:00 2026-05-26T05:08:32+00:00

I have approximately 5-6 reports, they are structured the same, using Watin, I’m testing

  • 0

I have approximately 5-6 reports, they are structured the same, using Watin, I’m testing each one of these reports.

I have a shared test, I call “ReportBaseTests”..

    public class ReportBaseTests
    {
        public string MenuName { get; set; }

        public ReportBaseTests(string name)
        { this.MenuName = name; }

        [TestMethod]
        public void Perform_Invalid_Date_Range()
        {
        }
    }

but in each of my tests, I have…

    [TestClass]
    public class Report1Tests : ReportBaseTests
    {
        public Report1Tests()
            : base("Report 1")
        { }
    }

This works… each report will have a seperate Perform_Invalid_date_range, and it’ll goto a different page… I was hoping someone had a better way to do this, as it also produces a seperate “non-runnable” test for the shared test since I didn’t include the [TestClass]

Now, I know I could use NUnit and pass in arguments, however, I’m sticking with MSTest for the time being

  • 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-26T05:08:33+00:00Added an answer on May 26, 2026 at 5:08 am

    If you wanted, you could add TestContext support to your tests and have the ReportBaseTests.Perform_Invalid_Date_Range() parse the TestContext.FullyQualifiedTestClassName. For a simple test I think that’s over kill.

    For your solution: just put the [TestClass] attribute on ReportBaseTests and then mark ReportBaseTests as abstract. The “non-runnable” tests will disappear.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 7-8 xml files. Each one is approximately 50 MB in size. What
I have approximately 10,000 records. Each records has 2 fields: one field is a
I have approximately 30 variadic functions. Each one accepts a path as the final
I have a MySQL table with approximately 3000 rows per user. One of the
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have approximately 5,000 matrices with the same number of rows and varying numbers
I have approximately 60.000 nodes in my Drupal installation. They are all unpublished, and
I have a SQL Server 2000 database with approximately 220 tables. These tables have
I have a series of approximately 50 images each approximately 100kb each that needs
I have a database of approximately 8,000 records. Each record has 1 text field

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.