Skip to content

Commit

Permalink
Create unit testing and add localization test (#509)
Browse files Browse the repository at this point in the history
- Add unit testing to the GRA project and Docker build process
- Fix #566 Create unit test to ensure all localizable text is present in .resx files
- Fix #562 adds the 'Thanks' annotation in the .en.resx file
  • Loading branch information
madison-boman authored and k7hpn committed Nov 4, 2019
1 parent 8b64fb6 commit a0f3c53
Show file tree
Hide file tree
Showing 8 changed files with 592 additions and 396 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Expand Up @@ -5,7 +5,11 @@ WORKDIR /app
# Copy source
COPY . ./

# Publish
# Build project and run tests
RUN dotnet build && \
find test -path "*/bin/*Test.dll" -type f -print0 |xargs -0 dotnet vstest --parallel

# Publish release project
RUN dotnet publish -c Release -o "/app/publish/"

# Get runtime image
Expand Down
10 changes: 10 additions & 0 deletions GreatReadingAdventure.sln
Expand Up @@ -16,6 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
GRARuleSet.ruleset = GRARuleSet.ruleset
README.md = README.md
TestSettings.testsettings = TestSettings.testsettings
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GRA.Web", "src\GRA.Web\GRA.Web.csproj", "{62E47447-A4E5-40FC-8CA7-12A0FBE46915}"
Expand Down Expand Up @@ -55,6 +56,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dev", "dev", "{2F931D25-1A2
dev\README.md = dev\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{44008A86-CC39-4EBF-A806-C391F4D8CB55}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GRA.Test", "test\GRA.Test\GRA.Test.csproj", "{4DF3AA9C-29B7-4BE6-9CE4-28B3785321F7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -109,6 +114,10 @@ Global
{05C5D3BB-DFFC-44EB-8A8B-C5B9D5A6448B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05C5D3BB-DFFC-44EB-8A8B-C5B9D5A6448B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{05C5D3BB-DFFC-44EB-8A8B-C5B9D5A6448B}.Release|Any CPU.Build.0 = Release|Any CPU
{4DF3AA9C-29B7-4BE6-9CE4-28B3785321F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4DF3AA9C-29B7-4BE6-9CE4-28B3785321F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DF3AA9C-29B7-4BE6-9CE4-28B3785321F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DF3AA9C-29B7-4BE6-9CE4-28B3785321F7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -128,6 +137,7 @@ Global
{E8041040-29F4-43F7-A9DF-EFCED64B22F0} = {0324DE44-14C1-4203-A624-5BE8BD75153E}
{1014D7A4-CAB9-4F28-9F83-F0083DC7A90A} = {0324DE44-14C1-4203-A624-5BE8BD75153E}
{05C5D3BB-DFFC-44EB-8A8B-C5B9D5A6448B} = {6BA5FF75-C5CE-45BC-8836-B2E689A571A1}
{4DF3AA9C-29B7-4BE6-9CE4-28B3785321F7} = {44008A86-CC39-4EBF-A806-C391F4D8CB55}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DF823FBB-4DD0-4907-9298-E01FB3497962}
Expand Down
27 changes: 27 additions & 0 deletions TestSettings.testsettings
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="TestSettings" id="976701b9-2dba-4915-b4b7-d27f37e2cdfd" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are default test settings for a local test run.</Description>
<Deployment enabled="false" />
<Execution hostProcessPlatform="MSIL">
<TestTypeSpecific>
<UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
<AssemblyResolution>
<TestDirectory useLoadContext="true" />
</AssemblyResolution>
</UnitTestRunConfig>
<WebTestRunConfiguration testTypeId="4e7599fa-5ecb-43e9-a887-cd63cf72d207">
<Browser name="Internet Explorer 9.0" MaxConnections="6">
<Headers>
<Header name="User-Agent" value="Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" />
<Header name="Accept" value="*/*" />
<Header name="Accept-Language" value="{{$IEAcceptLanguage}}" />
<Header name="Accept-Encoding" value="GZIP" />
</Headers>
</Browser>
</WebTestRunConfiguration>
</TestTypeSpecific>
<AgentRule name="LocalMachineDefaultRole">
</AgentRule>
</Execution>
<Properties />
</TestSettings>

0 comments on commit a0f3c53

Please sign in to comment.