Add basic test

This commit is contained in:
Athicha Leksansern 2025-07-24 17:59:33 +07:00
parent 016cac4a79
commit c9ecdd14b1
11 changed files with 5276 additions and 1 deletions

BIN
tests/.DS_Store vendored Normal file

Binary file not shown.

22
tests/README.md Normal file
View File

@ -0,0 +1,22 @@
# tests
## Setup
```bash
python -m venv .venv
source ./.venv/bin/activate
pip install -r requirements.txt
```
## Running Tests
``` bash
robotcode robot tests/
```
## Format Code
```bash
robocop format
``

4
tests/requirements.txt Normal file
View File

@ -0,0 +1,4 @@
robotframework
robotframework-seleniumlibrary
robotframework-robocop
robotcode[all]

View File

@ -0,0 +1 @@
BASE_URL = "http://localhost:5173"

2457
tests/results/log.html Normal file

File diff suppressed because one or more lines are too long

36
tests/results/output.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 7.3.2 (Python 3.13.5 on darwin)" generated="2025-07-24T17:58:51.991879" rpa="false" schemaversion="5">
<suite id="s1" name="Tests" source="/Users/tonkaew131/Developer/Web/ellely-robot-framework/tests/tests">
<suite id="s1-s1" name="000-Scroll-to-bottom-of-tile0" source="/Users/tonkaew131/Developer/Web/ellely-robot-framework/tests/tests/000-Scroll-to-bottom-of-tile0.robot">
<test id="s1-s1-t1" name="Scroll to bottom of tile0" line="8">
<kw name="Open Browser" owner="SeleniumLibrary">
<msg time="2025-07-24T17:58:52.058355" level="INFO">Opening browser 'Chrome' to base url 'http://localhost:5173/'.</msg>
<arg>url=${BASE_URL}/</arg>
<arg>browser=${BROWSER}</arg>
<doc>Opens a new browser instance to the optional ``url``.</doc>
<status status="PASS" start="2025-07-24T17:58:52.058212" elapsed="0.986909"/>
</kw>
<kw name="Close Browser" owner="SeleniumLibrary">
<doc>Closes the current browser.</doc>
<status status="PASS" start="2025-07-24T17:58:53.045530" elapsed="0.073908"/>
</kw>
<status status="PASS" start="2025-07-24T17:58:52.057846" elapsed="1.061824"/>
</test>
<status status="PASS" start="2025-07-24T17:58:51.999186" elapsed="1.120716"/>
</suite>
<status status="PASS" start="2025-07-24T17:58:51.992593" elapsed="1.127507"/>
</suite>
<statistics>
<total>
<stat pass="1" fail="0" skip="0">All Tests</stat>
</total>
<tag>
</tag>
<suite>
<stat name="Tests" id="s1" pass="1" fail="0" skip="0">Tests</stat>
<stat name="000-Scroll-to-bottom-of-tile0" id="s1-s1" pass="1" fail="0" skip="0">Tests.000-Scroll-to-bottom-of-tile0</stat>
</suite>
</statistics>
<errors>
</errors>
</robot>

2735
tests/results/report.html Normal file

File diff suppressed because one or more lines are too long

9
tests/robot.toml Normal file
View File

@ -0,0 +1,9 @@
# Basic settings
output-dir = "results"
log-level = "INFO"
python-path = ["."]
# Global variables
[variables]
BROWSER = "Chrome"
TIMEOUT = "20s"

View File

@ -0,0 +1,11 @@
*** Settings ***
Library SeleniumLibrary
Variables resources/env-variables.py
*** Test Cases ***
Scroll to bottom of tile0
Open Browser url=${BASE_URL}/ browser=${BROWSER}
Close Browser

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title> <title>robotframework demo for ellely</title>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>