I am unable to mark passed/Failed test status on the LambdaTest platform in c#. How to do that?

In the LambdaTest platform, I am unable to mark tests as passed or failed. What is the best way to accomplish this?

Hey Tim,

The user needs to use the below snippet:

bool passed = TestContext.CurrentContext.Result.Outcome.Status == NUnit.Framework.Interfaces.TestStatus.Passed;

To get the value of test result which needs to be passed in javascript executor to mark those staus on LambdaTest and make sure use the full snippet in the teardown method

[TearDown] public void Cleanup()

    {
        
        bool passed = TestContext.CurrentContext.Result.Outcome.Status == NUnit.Framework.Interfaces.TestStatus.Passed;
        try
        {
            // Logs the result to LambdaTest
            ((IJavaScriptExecutor)driver.Value).ExecuteScript("lambda-status=" + (passed ? "passed" : "failed"));
           
         
        }
        finally
        {
           
            // Terminates the remote webdriver session
            driver.Value.Quit();
        }