From cf5ee430f04c33fd9b34dee2ff20bf82e2839573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Ka=C5=88ka?= <124378142+LukasKanka@users.noreply.github.com> Date: Mon, 8 Jan 2024 00:18:56 +0100 Subject: [PATCH] =?UTF-8?q?dal=C5=A1=C3=AD=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.idea/dictionaries/lukas.xml | 3 + articles/cypress.html | 9 +- articles/mstest-zaklad.html | 147 ++++++++++++++++++ articles/nunit.html | 4 +- automatizovane-testovani.html | 2 + style.css | 80 +++++----- 6 files changed, 198 insertions(+), 47 deletions(-) create mode 100644 .idea/.idea.testing-docs.cz.dir/.idea/dictionaries/lukas.xml create mode 100644 articles/mstest-zaklad.html diff --git a/.idea/.idea.testing-docs.cz.dir/.idea/dictionaries/lukas.xml b/.idea/.idea.testing-docs.cz.dir/.idea/dictionaries/lukas.xml new file mode 100644 index 0000000..a513b68 --- /dev/null +++ b/.idea/.idea.testing-docs.cz.dir/.idea/dictionaries/lukas.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/articles/cypress.html b/articles/cypress.html index 3419cdc..551097a 100644 --- a/articles/cypress.html +++ b/articles/cypress.html @@ -1,12 +1,9 @@  - - - + + + diff --git a/articles/mstest-zaklad.html b/articles/mstest-zaklad.html new file mode 100644 index 0000000..e34adcd --- /dev/null +++ b/articles/mstest-zaklad.html @@ -0,0 +1,147 @@ + + + + + + + + + + + + Testing Docs - MStest založení projektu + + + +

Testing Docs CZ

+

Dokumentace pro všechny testery

+
+ +
+ +
+ + +
+

MStest založení projektu

+

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í ve VS Code:

+
+
    +
  • .NET Extension Pack
  • +
  • C#
  • +
  • Nuget Package Manager
  • +
+
+ +

Postup v VSCode:

+

Založení nového projektu ve Visual Studio Code:

+
+
    +
  • dotnet new mstest -n MyTestProject
  • +
  • dotnet add package Microsoft.NET.Test.Sdk
  • +
  • dotnet add package MSTest.TestFramework
  • +
+
+ +

Stažení Selenia (stahne potřebý základ):

+

V terminálu musíme do složky projektu co vytvořila dotnet new + mstest

+
+
    +
  • dotnet add package Selenium.WebDriver +
  • +
+
+ +

Test se spustí:

+
+
    +
  • dotnet test
  • +
  • nebo za pomocí
  • +
  • dotnet watch který sám automaticky sleduje změny v kódu a je schopný + spustit testy
  • +
+
+

Tento návod funguje jak pod Linux (odzkoušené v distribucích EndeavorOS,Ubuntu 22.04), MacOS, Windows + 11.

+ +

Příklad testu:

+
+
    +
  • using Microsoft.VisualStudio.TestTools.UnitTesting;
  • +
  • using OpenQA.Selenium;
  • +
  • using OpenQA.Selenium.Chrome;
  • +
  • namespace MyTestProject
  • +
  • {
  • +
  • [TestClass]
  • +
  • public class UnitTest1
  • +
  • {
  • +
  • [TestMethod]
  • +
  • public void TestMethod1()
  • +
  • {
  • +
  • string expectedTitle = "O mně - Lukáš bloguje";
  • +
  • string actualTitle = "";
  • +
  • IWebDriver driver = new ChromeDriver();
  • +
  • driver.Navigate().GoToUrl("https://lukaskanka.cz/");
  • +
  • IWebElement tlačítko = driver.FindElement(By.Id("xPath tlačítka"));
  • +
  • tlačítko.Click();
  • +
  • expectedTitle = "O mně - Lukáš bloguje";
  • +
  • actualTitle = driver.Title;
  • +
  • Assert.AreEqual(expectedTitle, actualTitle, "Title does not match");
  • +
  • }
  • +
  • }
  • +
  • }
  • +
+
+ + +
+
+ + + + + +
Nejdůležitější články:
+
  • Co je automatizované + testování +
  • +
  • Otázky a odpovědí k + Playwright
  • +
    +
    +
    + + + + + \ No newline at end of file diff --git a/articles/nunit.html b/articles/nunit.html index 8db02ea..d52cb56 100644 --- a/articles/nunit.html +++ b/articles/nunit.html @@ -51,7 +51,7 @@ dalšími knihovnami a nástroji, jako je například Selenium proautomatizované testování webových aplikací.

    - NUnit veškerou dokumentaci najdeš na oficiálním webu: Nunit.org + NUnit veškerou dokumentaci najdeš na oficiálním webu: Nunit.org

    @@ -77,4 +77,4 @@ - \ No newline at end of file + diff --git a/automatizovane-testovani.html b/automatizovane-testovani.html index 62a5cb0..905e6c5 100644 --- a/automatizovane-testovani.html +++ b/automatizovane-testovani.html @@ -65,6 +65,8 @@ Typescript
  • Cypress seznámení
  • Nunit založení projektu
  • +
  • Nunit seznámení
  • +
  • MStest založení projektu
  • diff --git a/style.css b/style.css index ab4e930..3150746 100644 --- a/style.css +++ b/style.css @@ -1,91 +1,93 @@ :root { - --special_black: rgb(11, 2, 2); - --special_white: white; - --special_grey: grey; - --special_black_original: black; + --special_black: rgb(11, 2, 2); + --special_white: white; + --special_grey: grey; + --special_black_original: black; } body { - background-color: var(--special_black); - color: var(--special_white); + background-color: var(--special_black); + color: var(--special_white); } .menu-item { - display: inline-block; - width: 200px; - height: 20px; - position: static; - text-align: center; + display: inline-block; + width: 200px; + height: 20px; + position: static; + text-align: center; } .flexbox { - display: flex; + display: flex; } .navigation { - flex: 1; - margin: 0px 0px 0px 50px; + flex: 1; + margin: 0px 0px 0px 50px; } .content { - flex: 3; - margin-bottom: 20px; + flex: 3; + margin-bottom: 20px; } .articles { - margin: 0px 50px 0px 0px; + margin: 0px 50px 0px 0px; } footer { - position: fixed; - bottom: 0; + position: fixed; + bottom: 0; } .big-text { - font-size: 40px; + font-size: 40px; } h1 { - font-family: cursive; - margin: 0px 0px 0px 30px; + font-family: cursive; + margin: 0px 0px 0px 30px; } h2 { - font-family: cursive; - margin: 0px 0px 0px 30px; + font-family: cursive; + margin: 0px 0px 0px 30px; } + +/*.link-white*/ .button { - color: var(--special_white); + color: var(--special_white); } td, th { - border: 1px solid var(--special_white); - padding: 10px; + border: 1px solid var(--special_white); + padding: 10px; } .code-box { - border: 1px solid var(--special_white); - padding: 10px; - background-color: var(--special_grey); - font-family: monospace; - color: var(--special_black_original); - font-weight: bold; - border-radius: 8px; + border: 1px solid var(--special_white); + padding: 10px; + background-color: var(--special_grey); + font-family: monospace; + color: var(--special_black_original); + font-weight: bold; + border-radius: 8px; } .not-dot { - list-style-type: none; + list-style-type: none; } .link { - color: var(--special_white); + color: var(--special_white); } .strong-text { - font-weight: bold; + font-weight: bold; } .link-black { - color: var(--special_black_original); -} \ No newline at end of file + color: var(--special_black_original); +}