0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VisualStudio2017 Ver15.8系でテストが実行できない

Posted at

VisualStudio2017 Version15.8.6にて、こんなサンプルテストを記載した。

using System;
using System.ComponentModel.DataAnnotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace UnitTestProject2 {
    [TestClass]
    public class UnitTest1 {

        [TestMethod]
        public void TestMethod1() {
            Assert.Equals("aaa", "aaa");
        }
    }
}

そうしたところ、以下のようなWarningメッセージが表示された。

[2019/11/26 17:46:46 Informational] テスト メソッド 'UnitTestProject2.UnitTest1.TestMethod1' を実行しています
[2019/11/26 17:46:46 Informational] ------ テストの実行が開始されました ------
[2019/11/26 17:46:47 Warning] No test is available for testcase filter `FullyQualifiedName=UnitTestProject2.UnitTest1.TestMethod1` in C:\Users\xxxx\UnitTestProject2\bin\Debug\UnitTestProject2.dll
[2019/11/26 17:46:47 Informational] ========== テストの実行が完了しました: 0 が実行されました (0:00:00.5789996) ==========

VisualStudioの不具合の模様。
Ver16.2以降では解消されているようなので、さっさと最新化。
https://developercommunity.visualstudio.com/content/problem/311537/unit-testing-cannot-findexecute-test-cases-anymore.html

最新化したところ、無事にテスト実行ができた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?