Skip to content

Commit

Permalink
Add UI Test build targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jwood803 committed Oct 9, 2015
1 parent edd0809 commit c62b8c6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 0 additions & 1 deletion FakeDemo/UITests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public void BeforeEachTest()
public void WelcomeTextIsDisplayed()
{
AppResult[] results = app.WaitForElement(c => c.Marked("Welcome to Xamarin Forms!"));
app.Screenshot("Welcome screen.");

Assert.IsTrue(results.Any());
}
Expand Down
15 changes: 14 additions & 1 deletion FakeDemo/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ open Fake.XamarinHelper
let buildDir = "FakeDemo/bin/Debug"
let testProj = !! "FakeDemo.UnitTests/FakeDemo.UnitTests.csproj"
let testDll = !! "FakeDemo.UnitTests/bin/Debug/FakeDemo.UnitTests.dll"
let uiTestProj = !! "UITests/FakeDemo.UITests.csproj"
let uiTestDll = !! "UITests/bin/Debug/FakeDemo.UITests.dll"

Target "Clean" (fun _ ->
CleanDir buildDir
Expand All @@ -16,6 +18,12 @@ Target "Build-UnitTests" (fun _ ->
|> Log "---Unit Test build output----"
)

Target "Build-UITests" (fun _ ->
uiTestProj
|> MSBuild "UITests\bin\Debug" "Build" [ ("Configuration", "Debug"); ("Platform", "Any CPU") ]
|> Log "---UI Test build output----"
)

Target "Run-UnitTests" (fun _ ->
testDll |> NUnit ( fun defaults ->
{
Expand All @@ -27,7 +35,12 @@ Target "Run-UnitTests" (fun _ ->
)

Target "Run-UITests" (fun _ ->
trace "UI Tests"
uiTestDll |> NUnit ( fun defaults ->
{
defaults with ToolPath = "/Library/Frameworks/Mono.framework/Commands/"
ToolName = "nunit-console4"
DisableShadowCopy = true
})
)

Target "Build-Pcl" (fun _ ->
Expand Down

0 comments on commit c62b8c6

Please sign in to comment.