Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ These are the recommended steps to create a pull request:

### Test specification

Now we have introduced the modern xUnit test projects for OData.NET (in `OData.Net45.sln`, or simply launch the `OData.sln` shortcut at the root level folder). **We strongly recommend you to write all new tests with xUnit. And it would be very kind of you to help migrate some existing MSTest cases when you modify them.** Those xUnit projects all adopt the same new intuitive structure that helps contributors to find the corresponding tests for the given product code very easily. Here are some rules to follow when you are organizing the test code:
Now we have introduced the modern xUnit test projects for OData.NET (in `OData.Net45.sln`, or simply launch the `OData.slnx` shortcut at the root level folder). **We strongly recommend you to write all new tests with xUnit. And it would be very kind of you to help migrate some existing MSTest cases when you modify them.** Those xUnit projects all adopt the same new intuitive structure that helps contributors to find the corresponding tests for the given product code very easily. Here are some rules to follow when you are organizing the test code:

- **Project name correspondence** (`X -> X.Tests`). For instance, all the test code of the `Microsoft.OData.Edm` project should be placed in the `Microsoft.OData.Edm.Tests` project. Path and file name correspondence. (`X/Y/Z/A.cs -> X.Tests/Y/Z/ATests.cs`). For example, the test code of the `CsdlSemanticsEntityContainer` class (in the `Microsoft.OData.Edm/Csdl/Semantics/CsdlSemanticsEntityContainer.cs` file) should be placed in the `Microsoft.OData.Edm.Tests/Csdl/Semantics/CsdlSemanticsEntityContainerTests.cs` file.
- **Namespace correspondence** (`X.Tests/Y/Z -> X.Tests.Y.Z`). The namespace of the file should strictly follow the path. For example, the namespace of the `CsdlSemanticsEntityContainerTests.cs` file should be `Microsoft.OData.Edm.Tests.Csdl.Semantics`.
Expand Down
94 changes: 0 additions & 94 deletions OData.E2E.sln

This file was deleted.

18 changes: 18 additions & 0 deletions OData.E2E.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Solution>
<Folder Name="/src/">
<Project Path="src/Microsoft.OData.Client/Microsoft.OData.Client.csproj" />
<Project Path="src/Microsoft.OData.Core/Microsoft.OData.Core.csproj" />
<Project Path="src/Microsoft.OData.Edm/Microsoft.OData.Edm.csproj" />
<Project Path="src/Microsoft.Spatial/Microsoft.Spatial.csproj" />
</Folder>
<Folder Name="/test/" />
<Folder Name="/test/e2eTests/">
<Project Path="test/EndToEndTests/Common/Microsoft.OData.Client.E2E.TestCommon/Microsoft.OData.Client.E2E.TestCommon.csproj" />
</Folder>
<Folder Name="/test/unitTests/">
<Project Path="test/UnitTests/Microsoft.OData.Client.Tests/Microsoft.OData.Client.Tests.csproj" />
<Project Path="test/UnitTests/Microsoft.OData.Core.Tests/Microsoft.OData.Core.Tests.csproj" />
<Project Path="test/UnitTests/Microsoft.OData.Edm.Tests/Microsoft.OData.Edm.Tests.csproj" />
<Project Path="test/UnitTests/Microsoft.Spatial.Tests/Microsoft.Spatial.Tests.csproj" />
</Folder>
</Solution>
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ Note: The project T4CrossPlatformTests.WindowsStore.csproj will not be loaded un

Simply open the shortcut `OData.sln` at the root level folder to launch a solution that contains the product source and relevant unit tests. Should you see the need to modify or add additional tests, please see the `sln` folder for the whole set of solution files.

Here is the usage of each solution file (the `OData.sln` shortcut opens the one marked default):
Here is the usage of each solution file (the `OData.slnx` shortcut opens the one marked default):

- OData.sln - Product source built with .Net Framework 4.5, .Net Standard 1.1 (except for OData Client ), .Net Standard 2.0. Unit Tests built with .Net Framework 4.5.2, .Net Core 1.1, .Net Core 2.1, .Net Core 3.1
- OData.E2E.sln - Product source built with .Net Framework 4.5. Contains exhaustive list of tests (unit, E2E, and regression). The `Build.cmd` script will run all tests from here and this solution is used to _fully_ test your code.
- OData.slnx - Product source built with .Net Framework 4.5, .Net Standard 1.1 (except for OData Client ), .Net Standard 2.0. Unit Tests built with .Net Framework 4.5.2, .Net Core 1.1, .Net Core 2.1, .Net Core 3.1
- OData.E2E.slnx - Product source built with .Net Framework 4.5. Contains exhaustive list of tests (unit, E2E, and regression). The `Build.cmd` script will run all tests from here and this solution is used to _fully_ test your code.

Each solution contains some test projects. Please open it, build it and run all the tests in the test explorer. For running tests within OData.E2E.sln you need to open Visual Studio IDE as **_Administrator_** so that the test services can be started properly.

Expand Down
6 changes: 3 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,12 @@ Function BuildProcess
rm $BUILDLOG
}

RunBuild ('OData.sln')
RunBuild ('OData.slnx')

if ($TestType -ne 'Quick')
{
# OData.E2E.sln contains the product code for Net45 framework and a comprehensive list of test projects
RunBuild ('OData.E2E.sln')
# OData.E2E.slnx contains the product code for Net45 framework and a comprehensive list of test projects
RunBuild ('OData.E2E.slnx')

# Solutions that contain .NET Core projects require VS2017 for full support. VS2015 supports only .NET Standard.

Expand Down
8 changes: 4 additions & 4 deletions buildandtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ steps:
command: 'build'
arguments: '--configuration $(BuildConfiguration) --no-incremental'
projects: |
$(Build.SourcesDirectory)\sln\OData.Pipeline.sln
$(Build.SourcesDirectory)\sln\OData.Pipeline.slnx

- task: DotNetCoreCLI@2
displayName: 'Test'
inputs:
command: 'test'
arguments: '--configuration $(buildConfiguration) --settings $(Build.SourcesDirectory)\test.runsettings --no-build --collect "Code Coverage"'
projects: |
$(Build.SourcesDirectory)\sln\OData.Pipeline.sln
projects: |
$(Build.SourcesDirectory)\sln\OData.Pipeline.slnx

- task: DotNetCoreCLI@2
condition: eq(variables.buildConfiguration, 'Release')
displayName: 'Test - E2E Tests'
inputs:
command: 'test'
arguments: '--configuration $(buildConfiguration) --settings $(Build.SourcesDirectory)\test.runsettings --collect "Code Coverage"'
projects: |
projects: |
$(Build.SourcesDirectory)\test\EndToEndTests\Tests\Client\Microsoft.OData.Client.E2E.Tests\Microsoft.OData.Client.E2E.Tests.csproj
$(Build.SourcesDirectory)\test\EndToEndTests\Tests\Core\Microsoft.OData.Core.E2E.Tests\Microsoft.OData.Core.E2E.Tests.csproj
$(Build.SourcesDirectory)\test\EndToEndTests\Tests\Edm\Microsoft.OData.Edm.E2E.Tests\Microsoft.OData.Edm.E2E.Tests.csproj
Loading