dneprokos / NetCoreFullStackTestAutomationSoltuion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NetCoreFullStackTestAutomationSoltuion

Summary

Rest API and Selenium 4 projects on .CORE 3.1

Prerequisites

  • IDE (integrated development environment) to work with the C# e.g. Visual Studio

Installation

  • Pull git solution
  • Build solution from IDE (e.g. in Visual Studio) or run the following command in command line: "dotnet build"

image

##How to run tests

From Visual Studio

  • In VIsual studio, Open root of the project tests you want to run, e.g. "JsonPlaceholder.Api.Tests" for API tests

  • Select .runsettings file you want to run with, on top navigation menu -> "Test" -> "Configure Run Settings" --> Select file from the project root image

  • Open Test Explorer window, on top navigation menu -> "Test" -> "Test Explorer"

  • Choice test you want to run or all tests scope

  • Right button context menu and click run

image

From command line

  • Open RestApiTestsOnDotNetCore3_1 test project root folder
  • Open CMD for this folder (or shell command line in Linux)
  • Type "dotnet test -s "./env.runsettings"", where -s is a location of .runsettings test configuration file

image

image

How to generate Allure report

Prerequisites

How to run

  • On Windows OS --> Find powershell script in the root of the any test projects "GenerateAllureResultsAndOpenInDockerContainer.ps1"
  • Run this script in powershell

image

Note: Results will be opened in Docker attached mode. It means, container will be stopped once you close PowerShell window. In order to run it in dettach mode, please open Powershell and change last line "docker-compose up" to "docker-compose up -d"

About


Languages

Language:C# 98.6%Language:PowerShell 0.9%Language:Dockerfile 0.6%