Commit Graph

38 Commits

Author SHA1 Message Date
Pranav K 82a01a414d
Set trace id in ProblemDetalsClientErrorFactory 2018-08-29 16:03:08 -07:00
Ryan Nowak 5c488bf09c make feature branch build 2018-07-20 12:57:43 -07:00
Doug Bunting 53857d052f
Add BasicApi and BasicViews apps
- #7805
- make initial copy of apps from aspnet/Performance repo
  - add apps to solution
  - add Readme for the benchmark apps
- update BasicApi app to actually do authentication and authorization
  - bug in the ported app
- refactor `Main` methods and add `CreateWebHostBuilder(...)` methods
- change projects to understand `$(BenchmarksTargetFramework)`
  - use NuGet.org EF packages to avoid changing the Universe build graph
- use SQLite instead of LocalDb by default
  - remove unnecessary appsettings.json files and JSON configuration support
- add EF migrations
  - (greatly) reduce startup times compared to creating / deleting databases
- add MySql, PostgreSQL, and SqlServer support
  - load BasicApi data in a `DbContext.OnModelCreating(...)` override
    - no longer need seed.sql
  - generalize migrations to support multiple providers
  - use negative seeding indices to work around npgsql/Npgsql.EntityFrameworkCore.PostgreSQL#36
  - work around Pomelo lack of strong name (PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#603)
  - use BenchmarksOnly* properties for EF dependencies
    - see also aspnet/Universe#1224
- drop databases (if SQLite) or migrations (otherwise) in `IApplicationLifetime.ApplicationStopping` handlers
- add functional tests
  - drop SQLite database at end of test run
- add benchmarks automation
  - add anonymous BasicApi action i.e. require no authorization
  - add non-antiforgery BasicViews actions

Address PR comments
- remove `AntiforgeryTestHelper` workarounds
- use `[ApiController]`
- use `ActionResult<Pet>`
- remove unused classes

nits:
- take VS suggestions in added files
- optionally display create and delete SQL scripts for per-database migrations
- merge `InsertData(...)` calls for consistency with most supported EF providers
  - SQLite is the only one that requires separate `INSERT`s and EF does the splitting
2018-06-22 16:41:17 -07:00
James Newton-King 58aa16ee69
Centralize routing and dispatching functional test logic (#7938) 2018-06-19 23:24:15 +12:00
Pranav K 1aea6fd5bd Remove instrumentation functional tests
Fixes #7921
2018-06-15 12:42:37 -07:00
James Newton-King a7406d4497
Add MvcEndpointDataSource and functional tests (#7886) 2018-06-14 11:03:45 +12:00
Pranav K e1eaf6a6e0
Cleanup TestCommon 2018-05-18 10:45:57 -07:00
Ryan Brandenburg 9f7629b448 Upgrade to netcoreapp22 2018-05-08 10:51:17 -07:00
Pranav K 133dd964ab Introduce ViewDataAttribute
Allow properties on controllers, Razor Page and Razor Page models annotatted with [ViewDataAttribute]
to populate ViewDataDictionary

Fixes https://github.com/aspnet/Mvc/issues/6525
2018-03-30 14:19:52 -07:00
Javier Calvarro Nelson 908e7a863b Improvements to the MVC testing package
* Clean up unnecessary workarounds on the build project.
* Remove the need to specify the content root relative to the solution
  and use a solution based on an assembly level attribute on the test
  assembly created at build time.
* Remove non parameterless constructors.
* Add support for creating specialized factories from the base factory
  and keep track of "child" factories for disposal.
* Add support for creating clients that handle cookies and redirects
  automatically.
2018-03-19 12:19:45 -07:00
Pranav K ae2d82c748 Remove FiltersWebSite 2018-03-16 16:54:10 -07:00
Ryan Nowak d58d0f917f Add support for recompilation 2018-01-08 15:26:20 -08:00
Doug Bunting bab520f4dd Use latest `Microsoft.AspNet.WebApi.Client` package
- #5822
- update `Microsoft.AspNet.WebApi.Client` package version
- remove remaining few `$(PackageTargetFallback)` settings
- remove .NET Standard-specific files
  - they duplicate what Microsoft.AspNet.WebApi.Client now provides
  - necessary only if cross-compiling a PCL version of the WebApiCompatShim
  - add type forwarding for the removed `public` types
- reenable .NET Framework WebApiCompatShim tests
- add breaking change record for `MediaTypeFormatterMatchRanking` value change
  - version of this type in the shim lacked the `MatchOnRequestWithMediaTypeMapping` value
2018-01-05 16:42:28 -08:00
Pranav K b6144142fe Update samples and tests to target netcoreapp2.1 2017-11-13 14:58:40 -08:00
Nate McMaster 2e4bc548f5
Pin tool and package versions to make builds more repeatable (#7013) 2017-10-31 19:18:14 -07:00
Nate McMaster b811e69d00 Use PackageLineup to manage PackageReference versions
- Move the Mvc.Performance project from test/ to benchmarks/.
 - Remove the Version attribute on PackageReference.
 - Add a reference to two PackageLineup's.
 - Add snippet to README explaining the additional requirement to run build.cmd /t:restore.
 - Add a target to check that packages have been pinned.
2017-08-30 12:14:11 -07:00
Nate McMaster b43b244830 Use Directory.Build.props/targets 2017-08-16 12:30:13 -07:00
Ryan Brandenburg 9e2f8b7cb5 Comment on remaining PackageTargetFallbacks 2017-07-07 15:01:07 -07:00
Javier Calvarro Nelson d917504c14 [Fixes #6468] Clean up the productionized testing infrastructure 2017-07-03 10:15:06 -07:00
Javier Calvarro Nelson 052db40567 Fix documentation and target files issues 2017-06-23 19:09:45 -07:00
Javier Calvarro Nelson 35152d5933 [Fixes #6233] Productionize and harden our functional testing infrastructure 2017-06-23 18:12:41 -07:00
Kiran Challa 0c6460ab64 Changed WebApiCompatShim projects to use PackageTargetFallback 2017-06-14 16:08:04 -07:00
Ryan Brandenburg 8832014516 PackageTarget->AssetTarget 2017-06-14 15:03:43 -07:00
N. Taylor Mullen 3448b6a74e Re-enable net461 functional tests.
aspnet/Coherence-Signed#540
2017-06-06 13:10:29 -07:00
Ryan Nowak ad6b029443 Temporarily disable MVC functional tests on net461 2017-05-25 21:10:01 -07:00
Ryan Brandenburg 9ea37a1bbb Fix TFM build breaks 2017-05-25 13:12:39 -07:00
Ryan Brandenburg 03404cd3df Return to NetStandard 2017-05-25 10:34:16 -07:00
Kiran Challa 04f74edd85 Revert "Disable building and testing FSharpWebSite to unblock the mirror when using latest CLI"
This reverts commit b28002a9e5.
2017-05-23 13:20:36 -07:00
Jass Bagga 9aff0a67c1 Range support for FileResult(#6150)
Addresses #3702
2017-05-19 10:51:46 -07:00
Nate McMaster d70bfdd1ea Upgrade test framework versions and fix test issues 2017-05-15 14:11:27 -07:00
Kiran Challa b28002a9e5 Disable building and testing FSharpWebSite to unblock the mirror when using latest CLI 2017-05-13 19:32:51 -07:00
Steve Sanderson a80594d706 Add FSharpWebSite plus simple functional test against it (#6231) 2017-05-05 19:08:36 +01:00
Pranav K 1c5e417606 Change TFM to netcoreapp2.0 (#6234)
* Change TFM to netcoreapp2.0
2017-05-04 18:11:26 -07:00
Pranav K badb6ce8e5 Remove net451 as a cross-compile target 2017-03-22 06:32:50 -07:00
Nate McMaster 6f7717a381 Unify dependency versions to one file 2017-03-15 16:54:32 -07:00
Doug Bunting 5c96a7cdef Use an alternate workaround for #5873
- use specific workaround for Microsoft/vstest#428
  - generating an executable for a test project is a bit too weird
- also work around dotnet/sdk#926
  - generating an executable covered this as well

nit: add and update comments about other workarounds in the functional tests project
2017-03-06 14:05:21 -08:00
Doug Bunting 9b3b3e91bd Re-enable functional tests on full .NET Framework
- #5873
- creating an EXE for the test project seems to work around #5873
  - also avoids dotnet/sdk#926 when building in Visual Studio

nit: clean up duplicate test data
2017-03-01 23:08:46 -08:00
N. Taylor Mullen acfad83aa6 Migrate to MSBuild
- thanx to @NTaylorMullen for initial conversion
  - e.g. AssemblyInfo.cs files were already minimized or removed :)
- allow `>=` RC3 CLI's to build and run MVC
- work around several dotnet migration issues; see #5482
- disable full .NET Framework runs of functional tests; see #5873
- remove `Microsoft.DotNet.InternalAbstractions` and `System.Xml.XmlDocument` dependencies
- remove project.json (!!), *.xproj, .notest, and web.config files

Redo earlier changes:
- apply test migration to .NET 4.5.2 in *.csproj world
  - see 63507c8 for previous, project.json work
- apply dependency version downgrade from 0097e40 in *.csproj world

Make other test-related changes:
- make Microsoft.AspNetCore.Mvc.TestDiagnosticListener a regular class library
- add support for `/p:GenerateBaselines=true` for functional and Razor.Host tests
- separate `GetCSharpTypeName_ReturnsCorrectTypeNames_ForOutParameter()` test
  - work around inability to deserialize a odd `ref` type
  - xUnit and vstest now serialize / deserialze test data more often
- skip poor test mentioned in #5768
- work around Microsoft/vstest#392
  - rename tests to avoid duplicates
- work around Microsoft/vstest#419
  - set up created `AppDomain`s with current `ApplicationBase`
2017-02-28 21:20:39 -08:00