[Solved] How to get the value of string in c# from a testmethod In C# [closed]


To pass a value from MyFirstTest to RunLookupMyString, you should modify the RunLookupMyString method to take the type of argument you want to pass. Then you can pass it by calling the method:

[CodedUITest]
public class ManyTests
{
    [TestMethod]
    public string MyFirstTest()
    {
        string a = "AAA";            
        return RunLookupMyString(a);
    }
}

public static string RunLookupMyString(string a)
{
    string b = a + " [modified by RunLookupMyString]";
    return b;
}

3

solved How to get the value of string in c# from a testmethod In C# [closed]