Questions tagged [testcontext]

38 questions
0
votes
0 answers

Test Context value null when called in inherited class

I have one test method in which i have called one function and in that function it further calls the evaluate function as which is mentioned below. protected bool Evaluate(bool condition, string message) { if (!condition) { …
himanshu
  • 1
  • 2
0
votes
2 answers

Textcontext property in MStest giving null reference exeption

I am trying to create a Unit test project in Visual studio 2017 . I want to use Testcontext class prorperties like TestName and etc in my test class and Test method . But when i run the project in debug mode i get null object reference for…
0
votes
2 answers

How to read every row in a column in Excel for a data driven unit test

I've setup data driven unit tests in my solution. It's wired up, everything is working fine, which is what most of the articles and questions online seem to be focused around. What I cannot find is how I read subsequent rows after the first row in…
maxshuty
  • 9,708
  • 13
  • 64
  • 77
0
votes
0 answers

c# - MSTEST - Test result file in MSTest shows all attachment for each of the test (Both Pass and Fail)

I have a selenium automation suite and the test cases has the capability to take a screenshot if a test fails. All the test are unit tests and are datadriven. What I meant by data driven is that the test gets executed for each of the data row.…
Timothy Rajan
  • 1,947
  • 8
  • 38
  • 62
0
votes
1 answer

Is there anything like Spring TestExecutionListener for TestSuite?

Currently for tests I'm using TestExecutionListener and it works just perfect public class ExecutionManager extends AbstractTestExecutionListener { @Override public void beforeTestClass(TestContext testContext) throws Exception { …
Anton
  • 449
  • 2
  • 7
  • 20
0
votes
2 answers

@ContextConfiguration doesn't create transaction proxy

I'm trying create some kind of integration test environment and encountered with issue when Test Context Framework doesn't create transaction proxies for my beans. My code: JUnit class:…
SergiiB
  • 3
  • 1
0
votes
1 answer

Run coded ui test from WPF application (without using mstest)

I want to run my coded ui test cases from a WPF application. However, when I initialize playback and call the test method, I am getting an error that the TestContext is NULL. Could anyone pls suggest if execution of coded ui test via WPF application…
Lavleen
  • 1
  • 1
0
votes
1 answer

Getting info from currently running unit test

I have to find info about the currently running UnitTest from a helper class' static method. The Idea is getting a unique key from each test. I thought about using TestContext, not sure if it is possible. Exemple [TestClass] public void…
Johnny5
  • 6,664
  • 3
  • 45
  • 78
1 2
3