C#
This commit is contained in:
36
Nunit_Win/.github/__workflows/zive.yml
vendored
Normal file
36
Nunit_Win/.github/__workflows/zive.yml
vendored
Normal 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
|
||||
|
||||
|
57
Nunit_Win/Nunit_založení_projektu.md
Normal file
57
Nunit_Win/Nunit_založení_projektu.md
Normal 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;
|
BIN
Nunit_Win/zive/.vs/zive/DesignTimeBuild/.dtbcache.v2
Normal file
BIN
Nunit_Win/zive/.vs/zive/DesignTimeBuild/.dtbcache.v2
Normal file
Binary file not shown.
Binary file not shown.
0
Nunit_Win/zive/.vs/zive/FileContentIndex/read.lock
Normal file
0
Nunit_Win/zive/.vs/zive/FileContentIndex/read.lock
Normal file
BIN
Nunit_Win/zive/.vs/zive/v17/.futdcache.v2
Normal file
BIN
Nunit_Win/zive/.vs/zive/v17/.futdcache.v2
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/.vs/zive/v17/.suo
Normal file
BIN
Nunit_Win/zive/.vs/zive/v17/.suo
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/.vs/zive/v17/TestStore/0/000.testlog
Normal file
BIN
Nunit_Win/zive/.vs/zive/v17/TestStore/0/000.testlog
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/.vs/zive/v17/TestStore/0/testlog.manifest
Normal file
BIN
Nunit_Win/zive/.vs/zive/v17/TestStore/0/testlog.manifest
Normal file
Binary file not shown.
1
Nunit_Win/zive/Usings.cs
Normal file
1
Nunit_Win/zive/Usings.cs
Normal file
@ -0,0 +1 @@
|
||||
global using NUnit.Framework;
|
5
Nunit_Win/zive/bash.bat
Normal file
5
Nunit_Win/zive/bash.bat
Normal 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.
BIN
Nunit_Win/zive/bin/Debug/net7.0/NUnit3.TestAdapter.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/NUnit3.TestAdapter.dll
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/bin/Debug/net7.0/NUnit3.TestAdapter.pdb
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/NUnit3.TestAdapter.pdb
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/bin/Debug/net7.0/Newtonsoft.Json.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/Newtonsoft.Json.dll
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/bin/Debug/net7.0/NuGet.Frameworks.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/NuGet.Frameworks.dll
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/bin/Debug/net7.0/WebDriver.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/WebDriver.dll
Normal file
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.
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.
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.
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.
BIN
Nunit_Win/zive/bin/Debug/net7.0/nunit.engine.api.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/nunit.engine.api.dll
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/bin/Debug/net7.0/nunit.engine.core.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/nunit.engine.core.dll
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/bin/Debug/net7.0/nunit.engine.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/nunit.engine.dll
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/bin/Debug/net7.0/nunit.framework.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/nunit.framework.dll
Normal file
Binary file not shown.
1
Nunit_Win/zive/bin/Debug/net7.0/nunit_random_seed.tmp
Normal file
1
Nunit_Win/zive/bin/Debug/net7.0/nunit_random_seed.tmp
Normal file
@ -0,0 +1 @@
|
||||
1186614180
|
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.
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.
BIN
Nunit_Win/zive/bin/Debug/net7.0/testcentric.engine.metadata.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/testcentric.engine.metadata.dll
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/bin/Debug/net7.0/testhost.dll
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/testhost.dll
Normal file
Binary file not shown.
BIN
Nunit_Win/zive/bin/Debug/net7.0/testhost.exe
Normal file
BIN
Nunit_Win/zive/bin/Debug/net7.0/testhost.exe
Normal file
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.
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.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user