This commit is contained in:
Lukáš Kaňka
2023-08-22 20:28:19 +02:00
commit 14d46cad1c
2236 changed files with 74214 additions and 0 deletions

36
Nunit_Win/.github/__workflows/zive.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: zive
on:
push:
branches: [ main ]
env:
NUNIT_VERSION: 3.12.0
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore zive/zive.csproj
- name: Build solution
run: dotnet build --configuration Release zive/zive.csproj
- name: Test with NUnit
run: dotnet test --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover zive/zive.csproj
env:
NUNIT_EXE: ./tools/nunit3-console.exe

View File

@ -0,0 +1,57 @@
dotnet add package Selenium.WebDriver
Nunit3TestAdapter
**Nainstalovat do PC:**
.NET 7.0 nebo 6.0 s dlouhou podporou
Visual Studio Code
nebo
Visual Studio 2022 - pouze WIN a MacOS
**Potřebná rozšíření:**
.NET Extension Pack
C#
Nuget Package Manager
**Postup vs code:**
dotnet new nunit
dotnet new nunit -n MyNUnitProject ---> vytvoří novou složku s projektem název je možno upravit
Nunit3TestAdapter ---> nutné také stáhnout
dotnet add package NUnit.ConsoleRunner ---> Pokud chci používat GitHub Actions
dotnet add package Selenium.WebDriver - stahne knihovny selenium přejít do složky projektu
Tento návod funguje jak pod Linux (odzkoušené v distribucích EndeavorOS, Ubuntu 22.04), MacOS, Windows 11.
Z důvodu kompaktibility jseou je na GitHub pouze samotný kód testu. Ostatní soubory a složky se vytvoří po založení projektu.
Složka TestResults také není součásti verze GitHub.
.....................................................................................................................................
aby test prošel je potřeba zkontrolovat hlavičku testu:
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using System;
using NUnit.Framework;
using System.Threading;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
Nunit_Win/zive/Usings.cs Normal file
View File

@ -0,0 +1 @@
global using NUnit.Framework;

5
Nunit_Win/zive/bash.bat Normal file
View File

@ -0,0 +1,5 @@
@echo off
dotnet test

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 not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
1186614180

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More