diff --git a/src/csharp/Grpc.Core.Tests/SanityTest.cs b/src/csharp/Grpc.Core.Tests/SanityTest.cs
index 343ab1e85a16617ca58c9fd2391aa36c27d1aad7..3830f0cbacf4f34280c485906735f81f18efb0d5 100644
--- a/src/csharp/Grpc.Core.Tests/SanityTest.cs
+++ b/src/csharp/Grpc.Core.Tests/SanityTest.cs
@@ -38,6 +38,7 @@ using System.Reflection;
 using Grpc.Core;
 using Grpc.Core.Internal;
 using Grpc.Core.Utils;
+using Newtonsoft.Json;
 using NUnit.Framework;
 
 namespace Grpc.Core.Tests
@@ -55,27 +56,23 @@ namespace Grpc.Core.Tests
         [Test]
         public void TestsJsonUpToDate()
         {
-            var testClasses = DiscoverAllTestClasses();
-            string testsJson = GetTestsJson();
+            var discoveredTests = DiscoverAllTestClasses();
+            string discoveredTestsJson = JsonConvert.SerializeObject(discoveredTests, Formatting.Indented);
 
-            // we don't have a JSON parser at hand, but check that the test class
-            // name is contained in the file instead.
-            foreach (var className in testClasses) {
-                Assert.IsTrue(testsJson.Contains(className),
-                    string.Format("Test class \"{0}\" is missing in C# tests.json file", className));
-            }
+            Assert.AreEqual(discoveredTestsJson, ReadTestsJson());
         }
 
         /// <summary>
         /// Gets list of all test classes obtained by inspecting all the test assemblies.
         /// </summary>
-        private List<string> DiscoverAllTestClasses()
+        private Dictionary<string, List<string>> DiscoverAllTestClasses()
         {
             var assemblies = GetTestAssemblies();
 
-            var testClasses = new List<string>();
+            var testsByAssembly = new Dictionary<string, List<string>>();
             foreach (var assembly in assemblies)
             {
+                var testClasses = new List<string>();
                 foreach (var t in assembly.GetTypes())
                 {
                     foreach (var m in t.GetMethods())
@@ -89,16 +86,19 @@ namespace Grpc.Core.Tests
 
                     }
                 }
+                testClasses.Sort();
+                testsByAssembly.Add(assembly.GetName().Name, testClasses);
             }
-            testClasses.Sort();
-            return testClasses;
+            return testsByAssembly;
         }
 
-        private string GetTestsJson()
+        /// <summary>
+        /// Reads contents of tests.json file.
+        /// </summary>
+        private string ReadTestsJson()
         {
             var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
             var testsJsonFile = Path.Combine(assemblyDir, "..", "..", "..", "tests.json");
-
             return File.ReadAllText(testsJsonFile);
         }
 
diff --git a/src/csharp/tests.json b/src/csharp/tests.json
index 718bfa3287bba342d9858fb647d3ebf973a0a053..f733352a310910da192525337be795b37b542fa1 100644
--- a/src/csharp/tests.json
+++ b/src/csharp/tests.json
@@ -1,11 +1,5 @@
 {
-  "assemblies": [
-    "Grpc.Core.Tests",
-    "Grpc.Examples.Tests",
-    "Grpc.HealthCheck.Tests",
-    "Grpc.IntegrationTesting"
-  ],
-  "tests": [
+  "Grpc.Core.Tests": [
     "Grpc.Core.Internal.Tests.AsyncCallTest",
     "Grpc.Core.Internal.Tests.ChannelArgsSafeHandleTest",
     "Grpc.Core.Internal.Tests.CompletionQueueEventTest",
@@ -32,13 +26,19 @@
     "Grpc.Core.Tests.ServerTest",
     "Grpc.Core.Tests.ShutdownTest",
     "Grpc.Core.Tests.TimeoutsTest",
-    "Grpc.Core.Tests.UserAgentStringTest",
-    "Math.Tests.MathClientServerTest",
+    "Grpc.Core.Tests.UserAgentStringTest"
+  ],
+  "Grpc.Examples.Tests": [
+    "Math.Tests.MathClientServerTest"
+  ],
+  "Grpc.HealthCheck.Tests": [
     "Grpc.HealthCheck.Tests.HealthClientServerTest",
-    "Grpc.HealthCheck.Tests.HealthServiceImplTest",
-    "Grpc.IntegrationTesting.HistogramTest",
+    "Grpc.HealthCheck.Tests.HealthServiceImplTest"
+  ],
+  "Grpc.IntegrationTesting": [
     "Grpc.IntegrationTesting.GeneratedClientTest",
     "Grpc.IntegrationTesting.GeneratedServiceBaseTest",
+    "Grpc.IntegrationTesting.HistogramTest",
     "Grpc.IntegrationTesting.InteropClientServerTest",
     "Grpc.IntegrationTesting.MetadataCredentialsTest",
     "Grpc.IntegrationTesting.RunnerClientServerTest",