Add steps for running integration tests to CONTRIBUTING.md
Closed this issue ยท 8 comments
We should add the steps needed to run the integration tests to the CONTRIBUTING.md so that it is easier for contributors to run and write integration tests.
Yes I used this one:
Then, after the mailbox server are create we need to run this command on Powershell:
FileServer
1.- Install this feature: Install-WindowsFeature Failover-Clustering 2.- Add "Exchange Trusted Subsystem" account into "Administrator group" 3.- Create directory "C:\Witness" and shared for everyone with full access 4.- Reboot the server
Mailbox Servers (MAIL1, MAIL2):
1.- Add default repository: Register-PSRepository -Default -InstallationPolicy Trusted 1.1 Get-PSRepository | Unregister-PSRepository 1.2 Register-PSRepository -Default -InstallationPolicy Trusted
DC Server:
1.- Go to Active Directory Users and Computers - OU Builtin - Double-click Administrators - Members tab and add "Exchange Trusted Subsystem" 2.- Create new and computer: Name DAG, on security tab chose "Exchange Trusted Subsystem" and give full control
ECP:
1.- Start - Exchange Administrative Center - logon - Servers - Database Availability Groups tab - " + " : + Database availability group name: DAG (the same on the point 2 for DC) + Witness server: fileserver + Witness directory: C:\Witness 2.- Go to MailFLow -> ReciveConnector and remove the default FrontEnd, if you don't remove the test fails
Install tools for testing:
Go to MAIL1 server:
1.- Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) 2.- choco install git 3.- choco install vscode
After that clone the next repo:
1.- mkdir src 2.- git clone https://github.com/PULLREQUEST 3.- cd .\xExchange\ 4.- git checkout AddPropertyOwaVirtualDirectory
Run the test on this order:
0.- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 1.- .\build.ps1 -ResolveDependency -Tasks noop 2.- .\build.ps1 -Tasks build 3.- .\build.ps1 -Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0
@RenatoMorenoR great, thank you. @mhincapie thank you, looking forward to a PR!
@johlju, thank you so much for the help. Would you mind reviewing the initial PR? Feel free to make any suggestions.
@mhincapie, this looks awesome, thanks for removing the unnecessary steps and focusing only on the tests, the other steps are part of my documentation ๐ .
I think the steps that @RenatoMorenoR wrote down will help contributors to setup the environment to be able to run the tests, so I think those should be added to the PR #468 as well. They can be extended to have more detailed steps in the future if there is a need.
What do you think?