Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestMethod with DataRow is not getting called #190

Closed
Faizan2304 opened this issue May 25, 2017 · 5 comments
Closed

TestMethod with DataRow is not getting called #190

Faizan2304 opened this issue May 25, 2017 · 5 comments
Labels
Help-Wanted The issue is up-for-grabs, and can be claimed by commenting State: Won't Fix

Comments

@Faizan2304
Copy link
Contributor

Repro code

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace mstest
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
			Assert.Fail();
        }
		
		[TestMethod]
		[DataRow(true)]
        public void TestMethod1(bool value)
        {
			Assert.IsTrue(value);
        }
    }
}

Expected Result:

One should pass and one should fail

Actual result:

Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170502-03
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Failed   mstest.UnitTest1.TestMethod1
Error Message:
 Assert.Fail failed.
Stack Trace:
   at mstest.UnitTest1.TestMethod1()

Failed   mstest.UnitTest1.TestMethod1
Error Message:
 Assert.Fail failed.
Stack Trace:
   at mstest.UnitTest1.TestMethod1()


Total tests: 2. Passed: 0. Failed: 2. Skipped: 0.
Test Run Failed.
Test execution time: 0.8397 Seconds
@AbhitejJohn AbhitejJohn added the bug label Jul 6, 2017
@AbhitejJohn
Copy link
Contributor

The adapter seems to be over-writing Overloaded methods.

@pvlakshm pvlakshm added the Help-Wanted The issue is up-for-grabs, and can be claimed by commenting label Nov 2, 2017
@jayaranigarg
Copy link
Member

jayaranigarg commented Dec 29, 2017

Looks similar to #340 .
Tagging @pvlakshm , @cltshivash to see if we can bring this in?

@ShreyasRmsft
Copy link
Member

@pvlakshm, @jayaranigarg, @cltshivash Looks like sbd is broken as well here. Shows only one test but runs the the first test twice the first time i hit run all. Thereafter runs the first test once

@ShreyasRmsft
Copy link
Member

Also it doesn't look like the adapter is overriding its more like its discovering 2 tests but running the first test twice.

@ShreyasRmsft
Copy link
Member

Also this is not related to #340. This is the issue with FQDN being same for both methods.

We need to add parameter types to the FQDN to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help-Wanted The issue is up-for-grabs, and can be claimed by commenting State: Won't Fix
Projects
None yet
Development

No branches or pull requests

5 participants