diff --git a/src/connector/C#/src/test/FunctionTest/FetchFields.cs b/src/connector/C#/src/test/FunctionTest/FetchFields.cs
index 67f24fe1a671657f47e75ee3d6e35e1ce0d9402d..b0a5859d4dddef0b24bd98cc8183917b6ec4e1cb 100644
--- a/src/connector/C#/src/test/FunctionTest/FetchFields.cs
+++ b/src/connector/C#/src/test/FunctionTest/FetchFields.cs
@@ -4,19 +4,32 @@ using TDengineDriver;
using System.Collections.Generic;
using Xunit;
using Test.UtilsTools.ResultSet;
+using Test.Fixture;
+using Test.Case.Attributes;
+
namespace Cases
{
- public class FetchFieldsCases
+ [TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")]
+ [Collection("Database collection")]
+ public class FetchFieldCases
{
+
+ DatabaseFixture database;
+
+
+ public FetchFieldCases(DatabaseFixture fixture)
+ {
+ this.database = fixture;
+ }
/// xiaolei
/// FetchFieldsCases.TestFetchFieldsJsonTag
/// test taos_fetch_fields(), check the meta data
/// FetchFields.cs
/// pass or failed
- [Fact(DisplayName = "FetchFieldsCases.TestFetchFieldsJsonTag()")]
- public void TestFetchFieldsJsonTag()
+ [Fact(DisplayName = "FetchFieldsCases.TestFetchFieldJsonTag()"),TestExeOrder(1),Trait("Category", "FetchFieldJsonTag")]
+ public void TestFetchFieldJsonTag()
{
- IntPtr conn = UtilsTools.TDConnection();
+ IntPtr conn = database.conn;
IntPtr _res = IntPtr.Zero;
string tableName = "fetch_fields";
var expectResMeta = new List {
diff --git a/src/connector/C#/src/test/FunctionTest/FetchLength.cs b/src/connector/C#/src/test/FunctionTest/FetchLength.cs
index 130b53bfc898231456c3f4d0c068108ffa7f50bd..928e1dfa92a723c52a2939bece2552ddeba7fd3f 100644
--- a/src/connector/C#/src/test/FunctionTest/FetchLength.cs
+++ b/src/connector/C#/src/test/FunctionTest/FetchLength.cs
@@ -4,8 +4,11 @@ using System.Collections.Generic;
using Xunit;
using TDengineDriver;
using Test.UtilsTools.ResultSet;
+using Test.Case.Attributes;
namespace Cases
{
+ [TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")]
+
public class FetchLengthCase
{
/// xiaolei
@@ -13,7 +16,7 @@ namespace Cases
/// TD-12103 C# connector fetch_row with binary data retrieving error
/// FetchLength.cs
/// pass or failed
- [Fact(DisplayName = "Skip FetchLengthCase.TestRetrieveBinary()")]
+ [Fact(DisplayName = "FetchLengthCase.TestRetrieveBinary()"),TestExeOrder(1)]
public void TestRetrieveBinary()
{
IntPtr conn = UtilsTools.TDConnection();
diff --git a/src/connector/C#/src/test/FunctionTest/InsertCn.cs b/src/connector/C#/src/test/FunctionTest/InsertCn.cs
index 3406f1cad448df20c1fb04f2d734738eaa1dfbea..51931340f50a9b9b8876a1d8ba2cf11c13259e97 100644
--- a/src/connector/C#/src/test/FunctionTest/InsertCn.cs
+++ b/src/connector/C#/src/test/FunctionTest/InsertCn.cs
@@ -5,19 +5,28 @@ using Test.UtilsTools.DataSource;
using Xunit;
using System.Collections.Generic;
using Test.UtilsTools.ResultSet;
+using Test.Case.Attributes;
+using Test.Fixture;
namespace Cases
{
+ [TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")]
+ [Collection("Database collection")]
public class InsertCNCases
{
+ DatabaseFixture database;
+ public InsertCNCases(DatabaseFixture fixture)
+ {
+ this.database = fixture;
+ }
/// xiaolei
/// InsertCNCases.TestNTable
/// Test insert Chinese characters into normal table's nchar column
/// InsertCn.cs
/// pass or failed
- [Fact(DisplayName = "InsertCNCases.TestNTable()")]
+ [Fact(DisplayName = "InsertCNCases.TestNTable"), TestExeOrder(1)]
public void TestNTable()
{
- IntPtr conn = UtilsTools.TDConnection();
+ IntPtr conn = database.conn;
IntPtr _res = IntPtr.Zero;
string tableName = "cn_insert_nchar_ntable";
// var expectResData = new List { "1637064040000", "true", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "XI", "XII", "{\"k1\": \"v1\"}" };
@@ -68,10 +77,10 @@ namespace Cases
/// test insert Chinese character into stable's nchar column,both tag and column
/// InsertCn.cs
/// pass or failed
- [Fact(DisplayName = "InsertCNCases.TestSTable()")]
+ [Fact(DisplayName = "InsertCNCases.TestSTable()"), TestExeOrder(2)]
public void TestSTable()
{
- IntPtr conn = UtilsTools.TDConnection();
+ IntPtr conn = database.conn;
IntPtr _res = IntPtr.Zero;
string tableName = "cn_insert_nchar_stable";
var colData = new List