Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #243 from jehine-MSFT/master
Browse files Browse the repository at this point in the history
Add CONTRIBUTING.md file and change test config set up
  • Loading branch information
pemari-msft committed Mar 16, 2016
2 parents e2c5a2a + 995857e commit 87b84b3
Show file tree
Hide file tree
Showing 14 changed files with 118 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ UpgradeLog*.XML
AppPackages/
Packages/

# Test Config
Test/Common/TestConfigurations.xml

# Test Results
TestResults/

Expand Down
1 change: 1 addition & 0 deletions BreakingChanges.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tracking Breaking Changes since 6.0

- All: TestConfigurations.xml has been deleted and added to the .gitignore file to keep users from accidentally leaking their credentials. To continue running tests, simply add the same file back after you get the latest code.
- All: The dnx and net target frameworks have been unified, and DNXCore target framework has been renamed to Dotnet5.4. All DNX4.5.1 projects will take a dependency on the regular Windows Desktop dll.

Tracking Breaking Changes since 5.0
Expand Down
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
If you intend to contribute to the project, please make sure you've followed the instructions provided in the [Azure Projects Contribution Guidelines](http://azure.github.io/guidelines/).
## Project Setup
The Azure Storage development team uses Visual Studio so instructions will be tailored to that preference. However, any preferred IDE or other toolset should be usable.

### Install
* .Net 4.5.1
* Visual Studio 2013. If you want to work with the CoreCLR SDK, you will need Visual Studio 2015. Note not all of the non-CoreCLR SDKs work in VS 2015, so you may need to develop with both 2013 and 2015 if you take a dependency on multiple runtimes.
* [StyleCop](http://stylecop.codeplex.com/) checks your code’s style – spacing, comments, etc. You can run this from the Tools menu in Visual Studio or by right clicking the project/folder you’d like to run it on.
* Clone the source code from GitHub.

### Open Solution
For non-CoreCLR solutions, you can open the project from VS using File->Open->Project/Solution and navigating to the Microsoft.WindowsAzure.Storage.sln solution file in the repo base folder.
For the CoreCLR solution, you can open the project using the AspNet_k.sln solution in the repo base folder.

## Tests

### Configuration
The only step to configure testing is to add a TestConfiguration.xml to the Test/Common/ folder. You should insert your storage account information into the file using [this](Test/Common/TestConfigurationsTemplate.xml) as a template.

### Running
To actually run tests, right click the individual test or test class in the Test Explorer panel.
*Note*: Running all tests will take many hours, so you should run a subset of tests that validate your change.

### Testing Features
As you develop a feature, you'll need to write tests to ensure quality. You should also run existing tests related to your change to address any unexpected breaks.

## Pull Requests

### Guidelines
The following are the minimum requirements for any pull request that must be met before contributions can be accepted.
* Make sure you've signed the CLA before you start working on any change.
* Discuss any proposed contribution with the team via a GitHub issue **before** starting development.
* Code must be professional quality
* No style issues, StyleCop doesn't report any *new* issues related to your changes
* You should strive to mimic the style with which we have written the library
* Clean, well-commented, well-designed code
* Try to limit the number of commits for a feature to 1-2. If you end up having too many we may ask you to squash your changes into fewer commits.
* [changelog.txt](changelog.txt) needs to be updated describing the new change
* Thoroughly test your feature

### Branching Policy
Non-breaking changes should be based on the dev branch whereas breaking changes should be based on the dev_breaking branch. Each breaking change should be recorded in [BreakingChanges.txt](BreakingChanges.txt).
We generally release any breaking changes in the next major version (e.g. 6.0, 7.0) and non-breaking changes in the next minor or major version (e.g. 6.0, 6.1, 6.2).

### Adding Features for All Platforms
We strive to release each new feature for each of our environments at the same time. Therefore, we ask that all contributions be written for both our Desktop SDK and our Window Runtime/CoreCLR SDK. This includes testing work for both platforms as well.

### Review Process
We expect all guidelines to be met before accepting a pull request. As such, we will work with you to address issues we find by leaving comments in your code. Please understand that it may take a few iterations before the code is accepted as we maintain high standards on code quality. Once we feel comfortable with a contribution, we will validate the change and accept the pull request.


Thank you for any contributions! Please let the team know if you have any questions or concerns about our contribution policy.
6 changes: 5 additions & 1 deletion Microsoft.WindowsAzure.Storage.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{CE1EB2B6-0DA8-43D4-A2E1-001804697009}"
ProjectSection(SolutionItems) = preProject
BreakingChanges.txt = BreakingChanges.txt
changelog.txt = changelog.txt
CONTRIBUTING.md = CONTRIBUTING.md
README.md = README.md
Lib\WindowsDesktop\WindowsAzure.Storage.nuspec = Lib\WindowsDesktop\WindowsAzure.Storage.nuspec
EndProjectSection
EndProject
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ We gladly accept community contributions.

- Issues: Please report bugs using the Issues section of GitHub
- Forums: Interact with the development teams on StackOverflow or the Microsoft Azure Forums
- Source Code Contributions: Please follow the [contribution guidelines for Microsoft Azure open source](http://azure.github.io/guidelines/) that details information on onboarding as a contributor
- Source Code Contributions: Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute code.

For general suggestions about Microsoft Azure please use our [UserVoice forum](http://feedback.azure.com/forums/34192--general-feedback).

Expand Down
13 changes: 10 additions & 3 deletions Test/ClassLibraryCommon/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@ public partial class TestBase
{
static TestBase()
{
XElement element = XElement.Load(TestConfigurations.DefaultTestConfigFilePath);
TestConfigurations configurations = TestConfigurations.ReadFromXml(element);
try
{
XElement element = XElement.Load(TestConfigurations.DefaultTestConfigFilePath);
TestConfigurations configurations = TestConfigurations.ReadFromXml(element);

TestBase.Initialize(configurations);
TestBase.Initialize(configurations);
}
catch (System.IO.FileNotFoundException)
{
throw new System.IO.FileNotFoundException("To run tests you need to supply a TestConfigurations.xml file with credentials in the Test/Common folder. Use TestConfigurationsTemplate.xml as a template.");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,12 @@
<Content Include="..\Common\Readme.txt">
<Link>Readme.txt</Link>
</Content>
<Content Include="..\Common\TestConfigurations.xml">
<Content Include="..\Common\TestConfigurationsTemplate.xml">
<Link>TestConfigurationsTemplate.xml</Link>
</Content>
</ItemGroup>
<ItemGroup Condition="Exists('..\Common\TestConfigurations.xml')">
<Content Include="..\Common\TestConfigurations.xml">
<Link>TestConfigurations.xml</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
Expand Down
5 changes: 5 additions & 0 deletions Test/WindowsPhone/Microsoft.WindowsAzure.Storage.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@
<Content Include="..\Common\Readme.txt">
<Link>Readme.txt</Link>
</Content>
<Content Include="..\Common\TestConfigurationsTemplate.xml">
<Link>TestConfigurationsTemplate.xml</Link>
</Content>
</ItemGroup>
<ItemGroup Condition="Exists('..\Common\TestConfigurations.xml')">
<Content Include="..\Common\TestConfigurations.xml">
<Link>TestConfigurations.xml</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@
<Content Include="..\Common\Readme.txt">
<Link>Readme.txt</Link>
</Content>
<Content Include="..\Common\TestConfigurationsTemplate.xml">
<Link>TestConfigurationsTemplate.xml</Link>
</Content>
</ItemGroup>
<ItemGroup Condition="Exists('..\Common\TestConfigurations.xml')">
<Content Include="..\Common\TestConfigurations.xml">
<Link>TestConfigurations.xml</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@
<Content Include="..\Common\Readme.txt">
<Link>Readme.txt</Link>
</Content>
<Content Include="..\Common\TestConfigurationsTemplate.xml">
<Link>TestConfigurationsTemplate.xml</Link>
</Content>
</ItemGroup>
<ItemGroup Condition="Exists('..\Common\TestConfigurations.xml')">
<Content Include="..\Common\TestConfigurations.xml">
<Link>TestConfigurations.xml</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
13 changes: 9 additions & 4 deletions Test/WindowsRuntime/Microsoft.WindowsAzure.StorageRT.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,8 @@
<Content Include="..\Common\Readme.txt">
<Link>Readme.txt</Link>
</Content>
<Content Include="..\Common\TestConfigurations.xml">
<Link>TestConfigurations.xml</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
<Content Include="..\Common\TestConfigurationsTemplate.xml">
<Link>TestConfigurationsTemplate.xml</Link>
</Content>
<Content Include="Images\UnitTestLogo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand All @@ -159,6 +157,13 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup Condition="Exists('..\Common\TestConfigurations.xml')">
<Content Include="..\Common\TestConfigurations.xml">
<Link>TestConfigurations.xml</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="MSSharedLibKey.snk" />
<None Include="RT_Test_TemporaryKey.pfx" />
Expand Down
17 changes: 12 additions & 5 deletions Test/WindowsRuntime/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,20 @@ public partial class TestBase
{
static TestBase()
{
StorageFile xmlFile = Package.Current.InstalledLocation.GetFileAsync(TestConfigurations.DefaultTestConfigFilePath).AsTask().Result;
XmlDocument xmlDoc = XmlDocument.LoadFromFileAsync(xmlFile).AsTask().Result;
try
{
StorageFile xmlFile = Package.Current.InstalledLocation.GetFileAsync(TestConfigurations.DefaultTestConfigFilePath).AsTask().Result;
XmlDocument xmlDoc = XmlDocument.LoadFromFileAsync(xmlFile).AsTask().Result;

XDocument doc = XDocument.Parse(xmlDoc.GetXml());
TestConfigurations configurations = TestConfigurations.ReadFromXml(doc);
XDocument doc = XDocument.Parse(xmlDoc.GetXml());
TestConfigurations configurations = TestConfigurations.ReadFromXml(doc);

TestBase.Initialize(configurations);
TestBase.Initialize(configurations);
}
catch (System.IO.FileNotFoundException)
{
throw new System.IO.FileNotFoundException("To run tests you need to supply a TestConfigurations.xml file with credentials in the Test/Common folder. Use TestConfigurationsTemplate.xml as a template.");
}
}
}
}
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Changes since 6.2.2-preview :

- All: TestConfigurations.xml has been deleted and added to the .gitignore file to keep users from accidentally leaking their credentials. To continue running tests, simply add the same file back after you get the latest code.

Changes in 6.2.2-preview :

- All: Fixed bug with CoreCLR UserAgent string.
Expand Down

0 comments on commit 87b84b3

Please sign in to comment.