Граф коммитов

268 Коммитов

Автор SHA1 Сообщение Дата
Nolan Glore efebd7f29d
Set IsClassInitializeExecuted=true after base class init to avoid repeated class init calls (#705) 2020-06-05 09:53:27 +02:00
hf-kklein 2a9cd11576
enhance documentation on when the TestCleanup is executed (#709)
To me it was unclear if it's once per `[TestClass]` or once per `[TestMethod]`.
2020-06-05 09:52:39 +02:00
Mateusz P-K 93a129b1f8
Improve CollectionAssert.Are*Equal docs (#711) (#712)
Added the information that collections' elements are
compared using object.Equals method when custom IComparer
is not specified for the assertion.
2020-06-05 09:52:03 +02:00
Johan Benschop 038d2ef97c
Fixed documentation for the TestMethodAttribute (#715)
This PR fixes a wrong XML documentation comment for the `displayName` parameter on the `TestMethodAttribute` constructor.
2020-06-05 09:51:23 +02:00
Andrew Pham 7b45d8ab5e
Make AssemblyCleanup/ClassCleanup execute even if Initialize fails. (#696)
Co-authored-by: Andrew Pham <anpha@microsoft.com>
2020-06-05 08:40:54 +02:00
Jeff Tyson ccc0dd8ac3
Change NuGet package to use `None` ItemGroup to copy files to output directory (#703)
Without this change, files from this nuget package will be included
automatically when the consuming project is packing.

Example error when packing a project:
> C:\Program Files\dotnet\sdk\3.1.200\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5):
warning NU5100: The assembly 'content\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll' is
not inside the 'lib' folder and hence it won't be added as a reference
when the package is installed into a project. Move it into the 'lib'
folder if it needs to be referenced.

Additionally, add the contents to an ItemGroup so they can be seperated later if needed.
2020-06-05 08:34:48 +02:00
Stuart Lang 3c76ad3a64
Add FSharp E2E test (#683)
* Add FSharp E2E test

* More representative method name

* Improve test

* Fix string expand

* Fix passed tests detection

* Fix typo in tests

* Comment grammar

* Review feedback

Co-authored-by: nohwnd <me@jakubjares.com>
2020-03-20 12:17:21 +01:00
Maximilian Chaplin efa1a6d934
remove unused usings (#694) 2020-03-03 08:04:06 +01:00
Thomas Bolon c0dedd72b1
fix blog link (#677)
blog url migrated to devblogs.microsoft.com/devops/
2020-02-28 17:06:13 +01:00
Maximilian Chaplin 7809838eba
Create Write() in TestContext (#686)
* added write to abstract and implementation class

* added tests for write

* added more implementations

* added tests and another implementation
2020-02-26 12:44:32 +01:00
Maximilian Chaplin 6815ba5335
switch arguments for expected and actual in Assert.AreEquals in multiple tests (#685)
* arrange Assert.AreEqual expected and actual arguments.

* Assert.AreEqual(false, to Assert.IsFalse(

* Assert.AreEqual(true, to Assert.IsTrue(

* Assert.AreEqual(null, to Assert.IsNull(

* fixed some asserts that require Assert.AreEqual

* fixed some others
2020-02-26 10:21:15 +01:00
Maximilian Chaplin 088fcd90d1
Spelling / conventions and grammar fixes (#688)
* spelling / conventions and grammar fixes

* Update test/UnitTests/PlatformServices.Shared.Unit.Tests/netstandard1.3/ns13TraceListenerTests.cs

* Update test/UnitTests/PlatformServices.Shared.Unit.Tests/netstandard1.3/ns13TraceListenerManagerTests.cs

Co-authored-by: Jakub Jareš <me@jakubjares.com>
2020-02-26 10:19:29 +01:00
nohwnd cdb43cce68 Revert fix 2020-01-30 19:42:24 +01:00
nohwnd 5464d993e9 Merge branch 'revert-631-user/nglore/teststartend' 2020-01-30 18:58:07 +01:00
Jakub Jareš 587164c7ae
Fix parameters in tests (#680) 2020-01-30 18:45:25 +01:00
Jakub Jareš 3c570cc825 Revert "Record test start/end events for data driven tests (#631)"
This reverts commit 6c1ee30a89.
2020-01-10 13:17:11 +01:00
Nolan Glore 664ac7c2ac Fix bugs in parent class init/cleanup logic (#660)
* Adding UT to catch issue where base class cleanup isn't called if not class cleanup on top level class

* Fix issue where base class cleanup isn't called when there is no top level class cleanup

* Add test to catch null ref ex when grandparent test class has class init/cleanup methods

* Fix null ref ex when grandparent test class has class init/cleanup methods
2019-12-20 11:34:29 +01:00
Nolan Glore 6c1ee30a89 Record test start/end events for data driven tests (#631)
* Moving RecordStart/RecordEnd events into TestMethodInfo.Invoke method

* Fix null ref and assembly name

* Flow test id to test method invoke and flow test id back via results

* Handle start/end events across AppDomains

* Fixing comments

* Getting tests building

* Pass assembly location through

* Fire start/end events for error cases

* Adding a few UTs

* Addressing PR feedback

* Add back old start/end events

* Missed a file

* Cleanup

* Fixing UTs
2019-12-20 11:23:13 +01:00
Michael DePouw d638ad8f84 Friendly test names (#466)
Add DisplayName parameter to TestMethod to allow friendly test names

Add the ability to specify a display name to a test method which can 
use arbitrary characters. 

Example

```csharp
[TestMethod("Friendly Name 🏆🤩 - It's a brave new world - spaces are ok 🎉")]
public void TestMethod1()
{
}
```
2019-12-17 18:30:22 +01:00
Jayarani garg b715c125be
Configuring child domain's appbase to be test source location (#659)
* Correcting error message when dynamic data doen't have any data

* Configuring child domain's appbase to be test source location

* Nit

* Catch typeload exception if TestAssemblySettingsProvider doesn't exist

* PR comments

* Nit
2019-11-26 16:50:33 +05:30
saxus 01ab1a2c1a Add information for Timeout parameters/property of the scale. (#657)
* Make meaning for XMLDoc.

* Fix.

* Syntax

* Syntax
2019-11-26 15:48:54 +05:30
Jimmy Lewis 2166170f73 Fix build script to work with VS2019 (#641)
* Fix build script to work with VS2019

The main change is to try to find msbuild using the 'Current' version
instead of the '15.0' version.  The MSBuild team has stated that
'Current' will be used going forward to avoid a breaking change to the
path when the version revs.

Also necessary in this change was to drop the /toolsVersion flag from
msbuild.  It was passing 15.0 but that tools version is not recognized in the
current MSBuild.

Lastly, added the UWP.Support component as a required build component.
When the build targets an instance of VS missing this feature, the build
will fail when trying to find Microsoft.Windows.UI.Xaml.CSharp.Targets.

* Handle when Resolve-Path throws if VS2019 is not present
2019-10-17 15:28:52 +05:30
Vagisha Nidhi 67c9f4358c
Certificate change SHA1 to hybrid (#635)
* Changing certificate from SHA1 to hybrid
2019-08-30 16:11:59 +05:30
Zbyněk Sailer 3b5926f843 LOC CHECKIN | Microsoft/testfx master | 20190708 (#625)
* LOC CHECKIN | Microsoft/testfx master | 20190708

* LOC CHECKIN | Microsoft/testfx master | 20190812 update
2019-08-13 11:33:27 +05:30
Carlos Parra c590c2b7d7 Class Initialize inheritance #143 (#577)
* Implemented Initialize Inheritance for ClassInitialize attribute

* Implemented Cleanup inheritance behavior for ClassCleanup attr

* Removed OnceBeforeAnyDerivedClasses from ClassInitializeInheritance enum

* Changed UTF.TestClass for custom testclass attr to avoid test ouput warnings

* Updated RunClassCleanup to prevent running base cleanup without having run base init

* Fix name typo

* added doc for BaseClassInitializeMethodsDict prop

* Updates per review comments

* making inheritance behavior enum more generic and updating tests

* done some refactoring and added/fixed a few tests

* updates as per review comments

* updated classinfo and tests

* updated classcleanup 1-param ctor

* updating doc message for 1-param ctors
2019-07-08 13:50:24 +05:30
Shreyas R 8bc7388557
Fixed IsNotInstanceOfType failing when objected being asserted on is null (#622)
* Update Assert.cs

* Update Assert.cs

* Update AssertTests.cs

* Update Assert.cs

* Update Assert.cs
2019-06-18 14:29:28 +05:30
Jayarani garg 38bd9965d4
Fix error message to suggest [UITestMethod] only for UWP Projects (#615)
* Correcting error message when dynamic data doen't have any data

* Fix error message to suggest [UITestMethod] only for UWP Projects
2019-06-07 14:09:28 +05:30
Steve Ashman 167533cadf Datarow tests - support methods with optional parameters (#604)
* add ResolveArguments to handle methods with optional arguments.

* update E2E unit test for new DataRow base/derived class tests

Signed-off-by: Steve Ashman <ssa3512@gmail.com>

* add some TestMethodInfo tests

Signed-off-by: Steve Ashman <ssa3512@gmail.com>

* split E2E datarow tests into multiple; add explanatory comments; add unit tests for TestMethodInfo.SetParameters; add support for methods with params arguments

* update datarowtests comments to reflect correct method names and counts being tested

* rename iterator variables to be more descriptive; remove duplicate derived class tests and rename tests to be more descriptive

* update datarow tests to only exist in DerivedClass so we aren't effectively running the same tests twice
2019-05-07 11:23:17 +05:30
Vagisha Nidhi ed79669c77
Setting MapNotRunnableToFailed to true by default (#610)
* Setting MapNotRunnableToFailed to true by default

* Review comments addressed
2019-04-29 14:29:55 +05:30
Carlos Parra c3d352cba0 Implementing 'AddResultFile' for NetCore TestContext (#609)
* Added implementation for AddResultFile method from TestContext

* Added implementation for GetResultFiles method

* Added unittests for AddResultFile and GetResultFile implementation

* reverted old changes on ns1.0 implementation

* implementing 'AddResultFile' for netcore

* fixed build issue and adding test for netcore testcontext impl

* fix review comments
2019-04-29 11:50:59 +05:30
Carlos Parra e50e638ac6 Updated .nuspec files with new license tag (#603)
* updated licenseUrl for license in nuspec files

* updated build script to copy license file

* updated azure-pipelines.yml file to match the latest nuget version

* added tag on NetCore PlatformServices project to fix build issue

* fixing build issue
2019-04-25 09:53:47 +05:30
Jayarani garg 938cec0340
Adding Quarteyly-Checkin link to ReadMe (#607) 2019-04-24 19:09:08 +05:30
Shiva Shankar 3da51487bc Removed the groovy file post onboarding to Azure Pipelines. (#602) 2019-04-17 12:29:55 +05:30
Shiva Shankar 2ae123de06
Update README.md
Status update for Azure Pipelines.
2019-04-09 19:14:09 +05:30
Paul Spangler 9d249f6032 Apply TestCategory from derived class on inherited test methods (#513)
* Apply TestCategory from derived class on inherited test methods

Enables sharing test methods across a class hierarchy while categorizing
the inherited tests based on the derived class that's actually running
them.

* Preserve DeclaringClassFullName from discovery to execution

* Restore GetCustomAttributeForAssembly taking in a MemberInfo, but reference the member's Module instead of DeclaringType

* Filter out duplicate test methods

Selects the one declared closest to the test class among all valid test
methods with the same name.

* Fix compile after latest merge from master
2019-04-09 18:18:49 +05:30
Sarabjot Singh 6c9b8e7ae9
Removing templates and wizards (#597)
* Removing the templates for this repo as they have been moved to http://github.com/dotnet/test-templates

* Removing the redundant ZipItems tool
2019-04-09 12:22:56 +05:30
Shiva Shankar 4f5d46bcd9
Azure Pipelines Support (#595)
Update azure-pipelines.yml
2019-04-08 17:14:41 +05:30
Shiva Shankar a208ab7a8e
Bugfix for CancellationTokenSource (#593)
* Bugfix for CancellationTokenSource

Added initialization that was missing in the NetCoreTestContext and added a test to cover the net core scenario as well.
2019-04-08 11:23:48 +05:30
ankit-nitd 249cc70547
Resource folder commit (#592) 2019-04-03 18:02:06 +05:30
ankit-nitd c956ab3ccb
Deployment Item support in .NET Core (#565)
Enabling DeploymentItem attr in NetCore
2019-04-02 17:18:59 +05:30
Shiva Shankar 5c80aaa1b4
Generated the xlf files for the changes (#590) 2019-04-01 17:36:03 +05:30
Shiva Shankar 19905681b9
Support for CancellationTokenSource in TestContext to help in timeout… (#585)
* Support for CancellationTokenSource in TestContext to help in timeout scenario
2019-03-28 14:46:54 +05:30
Zbyněk Sailer 0415ae3190 LOC CHECKIN | Microsoft/testfx master | 20190313 (#581)
* LOC CHECKIN | Microsoft/testfx master | 20190313

* LOC CHECKIN | Microsoft/testfx master | 20190314 fix
2019-03-14 19:54:18 +05:30
Jayarani garg 241d6c235f
Correcting error message when dynamic data doen't have any data (#544)
* Correcting error message when dynamic data doen't have any data

* PR comments

* Nit
2019-03-14 12:02:44 +05:30
Shiva Shankar b231cade5f
TestContext Properties type fixed to be IDictionary (#563)
* Ensured that the TestContext exposed is always IDictionary for back compat reasons.
2019-02-09 10:20:03 +05:30
Vagisha Nidhi 11304f00a7
MissingMethodException Fix (#555)
* MissingMethodException Fix

* Fixing DesktopTestContextImplTests
2019-01-25 13:46:03 +05:30
Jayarani garg ea644c1db3
Base class data rows should not be executed (#546)
* Base class data rows should not be executed

* Adding tests

* PR comments

* Nit
2019-01-11 11:53:53 +05:30
Jayarani garg 2862ccd4fc
Handling inner exceptions in Private Object (#545) 2019-01-10 14:19:06 +05:30
Vagisha Nidhi bec913906c
Setting Option for marking not runnable tests as failed (#524)
* Setting Option for marking not runnable tests as failed

* Comments addressed
2019-01-04 15:45:26 +05:30
Abhishek Kumawat eeb2b7fc25 unused return value in TestableReflectHelper (#547) 2018-12-21 16:39:57 +05:30