Skip to content

Commit

Permalink
Browsers Close After Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmmay committed Oct 25, 2022
1 parent bb1b5bb commit f97ca9c
Show file tree
Hide file tree
Showing 131 changed files with 619 additions and 381 deletions.
Binary file modified ConjuringTests/.vs/ConjuringTests/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ConjuringTests/.vs/ConjuringTests/v17/.futdcache.v1
Binary file not shown.
Binary file modified ConjuringTests/.vs/ConjuringTests/v17/.suo
Binary file not shown.
Binary file modified ConjuringTests/.vs/ProjectEvaluation/conjuringtests.metadata.v2
Binary file not shown.
Binary file modified ConjuringTests/.vs/ProjectEvaluation/conjuringtests.projects.v2
Binary file not shown.
2 changes: 1 addition & 1 deletion ConjuringTests/BasementPageObject.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using OpenQA.Selenium;
using OpenQA.Selenium.Interactions;
using OpenQA.Selenium.Support.UI;
using ConjuringTests.Components;
namespace ConjuringTests.Pages
{
public class BasementPageObject
Expand Down Expand Up @@ -35,6 +34,7 @@ public Boolean ClickPianoAlert()
if (alert != null)
{
_webDriver.SwitchTo().Alert().Accept();
_webDriver.Quit();
return true;
}
return false;
Expand Down
7 changes: 7 additions & 0 deletions ConjuringTests/BedroomBPageObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,12 @@ public String GetSliderValue()
{
return Slider.GetAttribute("value");
}

public String SliderBackAt0()
{
String val = Slider.GetAttribute("value");
_webDriver.Quit();
return val;
}
}
}
4 changes: 3 additions & 1 deletion ConjuringTests/BedroomGPageObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public void RepeatStepsAndEnterHighWeight(int weight)

public String GetWeightFormResultsText()
{
return ResultsText.Text;
String resultsText = ResultsText.Text;
_webDriver.Quit();
return resultsText;
}
}
}
35 changes: 0 additions & 35 deletions ConjuringTests/Components.cs

This file was deleted.

16 changes: 8 additions & 8 deletions ConjuringTests/ConjuringTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@

<ItemGroup>
<PackageReference Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Selenium.Support" Version="4.2.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.2.0" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="102.0.5005.6102" />
<PackageReference Include="Selenium.WebDriver.IEDriver" Version="4.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Selenium.Support" Version="4.5.1" />
<PackageReference Include="Selenium.WebDriver" Version="4.5.1" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="106.0.5249.6100" />
<PackageReference Include="Selenium.WebDriver.IEDriver" Version="4.5.0" />
<PackageReference Include="SpecFlow" Version="3.9.74" />
<PackageReference Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" />
<PackageReference Include="SpecFlow.xUnit" Version="3.9.74" />
<PackageReference Include="WebDriverManager" Version="2.13.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="WebDriverManager" Version="2.16.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="FluentAssertions" Version="6.8.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion ConjuringTests/ConjuringTests.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32505.173
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConjuringTests", "ConjuringTests.csproj", "{AE928091-1099-4518-81D1-87F59FC383D6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConjuringTests", "ConjuringTests.csproj", "{AE928091-1099-4518-81D1-87F59FC383D6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 3 additions & 1 deletion ConjuringTests/OutsidePageObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public void Click20Crows()

public String GetCrowCount()
{
return CrowCounter.Text;
String crowCount = CrowCounter.Text;
_webDriver.Quit();
return crowCount;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void WhenIRaiseAndLowerSlider()
[Then(@"the slider is back at 0")]
public void ThenTheSliderIsBackAt0()
{
String sliderValue = _bedroomBPage.GetSliderValue();
String sliderValue = _bedroomBPage.SliderBackAt0();
sliderValue.Should().Be("0");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void WhenIEnterLowWeightAndSubmit()
[When(@"I repeat steps and enter high weight")]
public void WhenIRepeatStepsAndEnterHighWeight()
{
_homePage.VerifyAtHomePage();
_homePage.GoToHomePage();
_homePage.NavigateToPageAndConfirm("Bedroom", "bedroom-g.html").Should().BeTrue();
_bedroomGPage.RepeatStepsAndEnterHighWeight(120);
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
74 changes: 74 additions & 0 deletions ConjuringTests/TestResults/foo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<html xmlns:tp="http://schemas.datacontract.org/2004/07/Microsoft.VisualStudio.TestPlatform.Extensions.HtmlLogger.ObjectModel" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<body>
<h1>Test run details</h1>
<div class="summary">
<div class="block"><span>Total tests</span><div class="total-tests">0</div><br></div>
<div class="block"><span>Passed  : </span><span class="passedTests">0</span><br><span>Failed  : </span><span class="failedTests">0</span><br><span>Skipped : </span><span class="skippedTests">0</span><br></div>
<div class="block"><span>Pass percentage</span><div class="pass-percentage">0 %</div><br></div>
<div class="block"><span>Run duration</span><div class="test-run-time">1s 370ms</div><br></div><br></div>
<h2>All Results</h2>
<div>
<h2>Error and Warning messages</h2><span>Could not find test executor with URI 'executor://xunit/VsTestRunner2/netcoreapp'. Make sure that the test executor is installed and supports .net runtime version .</span><br></div>
</body><script language="javascript">
function ToggleClass(id) {
var elem = document.getElementById(id);
if (elem.style.display == "none") {
elem.style.display = "block";
}
else {
elem.style.display = "none";
}
}
</script><style>
body { font-family: Calibri, Verdana, Arial, sans-serif; background-color: White; color: Black; }
h2 {
margin-top: 15px;
margin-bottom:10px;
}
pre {
white-space: pre-wrap;
}
.summary {font-family:monospace;
display: -webkit-flex; /* Safari */
-webkit-flex-wrap: wrap; /* Safari 6.1+ */
display: flex;
flex-wrap: wrap;
}
.row {
border: 2px solid #ffffff;
width:100%;
cursor:pointer;
background-color:#d7e9fa;
}
.list-row {
border: 2px solid #ffffff;
width:100%;
cursor:pointer;
background-color:#ffffff;
}
.inner-row{
border: 2px solid #ffffff;
padding-left:1%;
margin-left:1%;
background-color:#ffffff;
}
.block{
width : 150px;
}
.leaf-division{
border: 2px solid #ffffff;
background-color:#e6eff7;
}
.pass { color: #0c0; }
.fail { color: #c00; }
.error-message { color : brown; }
.error-stack-trace { color: brown; }
.duration {float:right;padding-right:1%;}
.total-tests { font-size : 30px}
.test-run-time { font-size : 30px}
.pass-percentage { font-size : 30px}
.error-info{
margin-left:16px;
}
</style>
</html>
28 changes: 28 additions & 0 deletions ConjuringTests/TestResults/foo.trx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<TestRun id="96878103-a4e4-4569-97bc-d91cd3f6e6cb" name="Ethan@ETHANS-PC 2022-10-25 17:14:19" runUser="ETHANS-PC\Ethan" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Times creation="2022-10-25T17:14:19.1256091-06:00" queuing="2022-10-25T17:14:19.1256091-06:00" start="2022-10-25T17:14:16.4922588-06:00" finish="2022-10-25T17:14:19.1256091-06:00" />
<TestSettings name="default" id="35ae1857-c4dd-455e-be9b-2dedec52e5e2">
<Deployment runDeploymentRoot="Ethan_ETHANS-PC_2022-10-25_17_14_19" />
</TestSettings>
<TestLists>
<TestList name="Results Not in a List" id="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestList name="All Loaded Results" id="19431567-8539-422a-85d7-44ee4e166bda" />
</TestLists>
<ResultSummary outcome="Failed">
<Counters total="0" executed="0" passed="0" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
<RunInfos>
<RunInfo computerName="ETHANS-PC" outcome="Warning" timestamp="2022-10-25T17:14:19.0114258-06:00">
<Text>Could not find test executor with URI 'executor://xunit/VsTestRunner2/netcoreapp'. Make sure that the test executor is installed and supports .net runtime version .</Text>
</RunInfo>
</RunInfos>
<CollectorDataEntries>
<Collector agentName="ETHANS-PC" uri="datacollector://microsoft/CodeCoverage/2.0" collectorDisplayName="Code Coverage">
<UriAttachments>
<UriAttachment>
<A href="ETHANS-PC\Ethan_ETHANS-PC_2022-10-25.17_14_17.coverage"></A>
</UriAttachment>
</UriAttachments>
</Collector>
</CollectorDataEntries>
</ResultSummary>
</TestRun>
1 change: 1 addition & 0 deletions ConjuringTests/XMLFile1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?>
Binary file modified ConjuringTests/bin/Debug/net6.0/AngleSharp.dll
Binary file not shown.
Loading

0 comments on commit f97ca9c

Please sign in to comment.