Questions tagged [approval-tests]

ApprovalTests is an open source library written for several languages (.NET, Java, PHP, more) which has been designed to support unit testing based on the idea of a Golden Master. To download go to www.ApprovalTests.com.

ApprovalTests is an open source library written for several languages (.NET, Java, PHP, more) which has been designed to support unit testing based on the idea of a Golden Master. To learn more go to www.ApprovalTests.com official site. There is also a YouTube playlist of screencasts (by Llewellyn) on using ApprovalTests with .NET and a dedicated blog. To get the sources you can go to the Git repository.

46 questions
1
vote
2 answers

Why must I include the received files in my source control with ApprovalTest?

I was reading the documentation of ApprovalTest - Getting Started.pdf (it's in the zip here) and the last thing it says under Approving The Result is "Note: you must include the received files in your source control." This really confused me. Can…
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
1
vote
1 answer

ApprovalTests....Moving the assemblies after compile

First up, great library! If I compile, then move the assemblies when I verify it still looks for the *.approved.txt in the location it was compiled in, which in my case no longer exists. I'm running into this issue on Teamcity where we build and…
Dan Black
  • 1,167
  • 3
  • 14
  • 20
0
votes
0 answers

Delay only since a week within approval flows

Wondering if anyone else is experiencing a 2 - 5 minute delay with power automate approval emails? It has been like this all week. Teams notifications still come in right away. I never had this issue before. Thank you in advance! I never had this…
0
votes
1 answer

How to correctly use approval tests for comparing 2 excel files

I have an automated test scenario wherein 2 excel files are getting compared. This is currently being done using ApprovalTests verify method. Excel is being converted into string and is compared. When this test was run for the first time, it failed…
0
votes
1 answer

Should I use approval tests as part of CI test run?

What is the common approach for working with CI and ApprovalTests? I've encountered an issue because access to the approval file was denied. So I start to wonder whether I should use ApprovalTests in CI test run. What is the recommended location for…
0
votes
1 answer

AppVeyor not producing artifacts

Trying to get insight into why our tests are failing in AppVeyor, by looking at some of the Approval files it produces. We tried configuring AppVeyor to collect the .received files, like this: artifacts: - path: '**\*.received.*' We also tried…
Jay Bazuzi
  • 45,157
  • 15
  • 111
  • 168
0
votes
1 answer

ApprovalTests.Asp.Mvc has an error

I'm using ApprovalTests, and using ApprovalTests.Asp; doesn't have errors. On the other hand, I get an error when i try to use ApprovalTests.Asp.Mvc: using ApprovalTests.Asp.Mvc; Error CS0234 The type or namespace name 'Mvc' does not exist in…
0
votes
0 answers

Is there way to edit and save the existing pdf stamp without changing the rest of the pdf

Can somebody help me with a code rather than asking me to refer to itextsharp and pdf. Basically I am trying to edit an existing pdf timestamp in the first page and a date in the second page, which is in a table and its a 100 page document. I am…
karthick
  • 1
  • 1
0
votes
1 answer

PDF generated on CI server fails Approval Test

I am trying out ApprovalTests.NET to test some (mostly legacy) PDF generation code build on MigraDoc. The code under test renders the PDF to a MemoryStream, which is then scrubbed of various metadata properties (using code I adapted from…
Blisco
  • 601
  • 6
  • 14
0
votes
2 answers

ApprovalTests DiffReporter is not popping up diff window when test is failed

ApprovalTests DiffReporter is not popping up diff window after running the test if the test is failed. Below is my code. [UseReporter(typeof(DiffReporter))] [TestClass] public class ProjectEmployeeJsonTests { [TestMethod] public void…
Deepak Ageeru
  • 69
  • 1
  • 6
0
votes
1 answer

NCrunch is launching the ApprovalTests DiffReporter

How do I get NCrunch to stop launching the DiffReporter when it is running tests in the background, but easily get the DiffReport when I manually run a test? I've been trying to get this working for a while now, but none of the combinations I've…
tehDorf
  • 775
  • 1
  • 11
  • 32
0
votes
1 answer

How to specify approved.txt files location for running approvals tests on TeamCity

I am trying to run my approvals tests from nUnit under TeamCity [assembly: FrontLoadedReporter(typeof(TeamCityReporter))] [Test] [UseReporter(typeof(WinMergeReporter))] public void Test() { } Unfortunately test…
bublegumm
  • 315
  • 1
  • 3
  • 10
0
votes
1 answer

Nunit tests with MvcApprovals Verify specific url

the project url of my mvc application is hosted like this localhost:port/AppName I created a new unit test project to test the mvc app using nunit framework and for approval tests I used Approval Tests Library [Test] …
Joy
  • 1,707
  • 7
  • 29
  • 44
0
votes
1 answer

File getting deleted when using ApprovalTests

Consider the following code: [Test, UseReporter(typeof(WinMergeReporter))] public void Test() { var fileToVerify = "test.csv"; Approvals.VerifyFile(fileToVerify); } Whenever I run this, the file "test.csv" gets deleted. In the…
DavidS
  • 2,179
  • 4
  • 26
  • 44
0
votes
1 answer

Verify a Tif with ApprovalTests

I have been asked to update a system where header information gets injected into a tif via a 3rd party console application. I don't need to worry about that bit. The part I have been asked to look at it the merge process that generates the header…
Luke Duddridge
  • 4,285
  • 35
  • 50