TestProject Forum

Upload error for C# Coded Test: No CodedTests were found in your assembly

  1. Initially I followed the basic tutorial on OpenSDK C#, that worked fine for me.
  2. After that, I investigated how I could parameterized it. I found information on GitHub for that and followed the instructions there.
  3. When I try to package and upload this basic test, I get an error message below

Code for UnitTest.cs:

using System.Threading;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using TestProject.OpenSDK.DataProviders;
using ChromeDriver = TestProject.OpenSDK.Drivers.Web.ChromeDriver;

namespace MyFirstOpenSDKTest.NUnit
{
    public class ExampleTest
    {
        private ChromeDriver driver;

        [SetUp]
        public void Setup()
        {
            driver = new ChromeDriver(chromeOptions: new ChromeOptions());
        }

        [TestCaseSource(typeof(TestProjectDataProvider), nameof(TestProjectDataProvider.DataSource))]
        public void ParamTest(string username, string password)
        {
            driver.Navigate().GoToUrl("https://example.testproject.io");
            driver.FindElement(By.CssSelector("#name")).SendKeys("John Smith");
            driver.FindElement(By.CssSelector("#password")).SendKeys("12345");
            driver.FindElement(By.CssSelector("#login")).Click();

            Assert.IsTrue(driver.FindElement(By.CssSelector("#greetings")).Displayed);
            driver.Quit();
        }

        [TearDown]
        public void TearDown()
        {
            driver.Quit();
        }
    }
}

Other info:
VS Studio 2019
.NET core 3.1
Windows 10

Relates to How can I create Testproject parameters in coded C# test?

Hi @Philip.Wong

Parameterizing C# tests procedure is indeed documented but is not fully implemented.
There are a few minor things to adjust and test before it can be functional.

I will update you next week regarding the status.

Thanks Marat, I’ll wait to hear from you next week. Just for my info, do you think parameterizing is more stable in java-opensdk?

@Philip.Wong

In Java, it’s fully implemented and functional.

1 Like