This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x39E63a7B368F68B1c5d0F9C566D2A3C73Bf59004 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.safebear</groupId> | |
<artifactId>tasklist</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>war</packaging> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
options { | |
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3')) | |
} | |
agent any | |
parameters { | |
string(name: 'apiTests', defaultValue: 'ApiTestsIT', description: 'API tests') | |
string(name: 'cuke', defaultValue: 'RunCukesIT', description: 'cucumber tests') | |
string(name: 'context', defaultValue: 'safebear', description: 'application context') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IWebElement WaitForElement(By locator) | |
{ | |
// Here we set the timeout as 5 second, 0 minutes and 0 hours | |
WebDriverWait wait = new WebDriverWait(Browser, new TimeSpan(0, 0, 5)); | |
// Here we set the `Until` condition as until the browser finds the element. If it find the element in 5 seconds, it will return it. | |
return wait.Until(Browser => Browser.FindElement(locator)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string GetPathToMyDocuments() | |
{ | |
// return the absolute path to the MyDocuments folder on your computer | |
return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); | |
} | |
// you need to pass through the filename you want to call your screenshot | |
public static void FullScreenScreenshot(string fileName) | |
{ | |
// take the screenshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources: | |
# The 'repo' section defines the code repository (self means 'this one' i.e. ToolsList) | |
- repo: self | |
# The 'queue' section defines the machine on which we'll run our code and what are the tools we'll need to run the tests | |
queue: | |
# We'll use a standard machine that Azure provides for free. It comes pre-installed with Visual Studio 2017 | |
name: Hosted Windows 2019 with VS2019 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nunit3-console.exe --labels=All --out=TestResult.txt “--result=TestResult.xml;format=nunit2” ToolsList.AcceptanceTests\bin\Debug\ToolsList.AcceptanceTests.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
specflow.exe nunitexecutionreport --ProjectFile ToolsList.AcceptanceTests\ToolsList.AcceptanceTests.csproj --xmlTestResult TestResult.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.EntityFrameworkCore; | |
using SprintTracker.Web.Controllers; | |
using SprintTracker.Web.Models; | |
using System.Threading.Tasks; | |
using Xunit; | |
namespace SprintTracker.Tests | |
{ | |
public class SprintsControllerTest | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.EntityFrameworkCore; | |
using SprintTracker.Web; | |
using SprintTracker.Web.Models; | |
using System.Linq; | |
using Xunit; | |
namespace SprintTracker.Tests | |
{ | |
public class SprintTrackerWebContextTest | |
{ |
OlderNewer