Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions AgeRanger_Automation/AgeRangerWebUi/AgeRangerWebUi.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E82ADCC4-BD7A-4659-8B5F-7A79B0C4B25C}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>AgeRangerWebUi</RootNamespace>
<AssemblyName>AgeRangerWebUi</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TechTalk.SpecFlow, Version=2.2.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
<HintPath>..\packages\SpecFlow.2.2.1\lib\net45\TechTalk.SpecFlow.dll</HintPath>
</Reference>
<Reference Include="WebDriver, Version=3.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Selenium.WebDriver.3.7.0\lib\net45\WebDriver.dll</HintPath>
</Reference>
<Reference Include="WebDriver.Support, Version=3.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Selenium.Support.3.7.0\lib\net45\WebDriver.Support.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Driver\Driver.cs" />
<Compile Include="Features\AddNewPerson.feature.cs">
<DependentUpon>AddNewPerson.feature</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Features\DeletePerson.feature.cs">
<DependentUpon>DeletePerson.feature</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Features\EditPerson.feature.cs">
<DependentUpon>EditPerson.feature</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="PageObjects\AgeRangerMainPage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Steps\PersonSteps.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="Features\AddNewPerson.feature">
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>AddNewPerson.feature.cs</LastGenOutput>
</None>
<None Include="Features\DeletePerson.feature">
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>DeletePerson.feature.cs</LastGenOutput>
</None>
<None Include="Features\EditPerson.feature">
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>EditPerson.feature.cs</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
11 changes: 11 additions & 0 deletions AgeRanger_Automation/AgeRangerWebUi/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<specFlow>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
</specFlow></configuration>
23 changes: 23 additions & 0 deletions AgeRanger_Automation/AgeRangerWebUi/Driver/Driver.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AgeRangerWebUi.Driver
{
public class Driver
{
public IWebDriver GetRemoteDriver()
{
var capabilities = new DesiredCapabilities();
capabilities.SetCapability("browserName", "Chrome");
capabilities.SetCapability("platform", "Windows 10");
capabilities.SetCapability("version", "62.0");
return new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), capabilities,
TimeSpan.FromSeconds(60));
}
}
}
25 changes: 25 additions & 0 deletions AgeRanger_Automation/AgeRangerWebUi/Features/AddNewPerson.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Feature: Add New Person
This feature will cover the different tests for Adding a New Person to the system

@basicFlow
Scenario Outline: AddNewPersonComplete
Given I navigate to http://ageranger.azurewebsites.net
When I click on the AddPerson button
And I add a new person with <FirstName> as a FirstName, <LastName> as a LastName and <Age> as Age
Then I can see a new person the Landing page with <FirstName>,<LastName>,<Age> and <AgeRange>

Examples:
| FirstName | LastName | Age | AgeRange |
| MyName | MyLastName | 40 | Very adult |

@exceptionFlow
Scenario Outline: AddNewPersonFail
Given I navigate to http://ageranger.azurewebsites.net
And I click on the AddPerson button
When I type <something> in the First Name field
And I clear the First Name field
Then I can see an inline error with message <FirstNameInlineError>

Examples:
| something | FirstNameInlineError |
| something | First name is required." |
125 changes: 125 additions & 0 deletions AgeRanger_Automation/AgeRangerWebUi/Features/AddNewPerson.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Feature: DeletePerson
This feature will cover the different tests for Deleting a Person to the system

@basicFlow
Scenario: DeletePersonComplete
Given I navigate to http://ageranger.azurewebsites.net
When I delete the first Person in the list
And I click on Confirm
Then the count of people should decrease by one

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading