Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 63 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,110 @@

![](https://img.shields.io/github/stars/hsiangfeng/README-Example-Template.svg)|![](https://img.shields.io/github/forks/hsiangfeng/README-Example-Template.svg)|![](https://img.shields.io/github/issues-pr/hsiangfeng/README-Example-Template.svg)|![](https://img.shields.io/github/issues/hsiangfeng/README-Example-Template.svg)

> 由於許多人都不知道如何撰寫 README,所以我就提供一個 README 範本,讓大家可以參考,許多地方你都可以斟酌是否要加入,或是修改成你自己的風格。
> EMU200 Automation Instructions

**ps. 底下範本不是絕對,你可以依照自己需求斟酌增加或刪除。**

# README Template

![專案封面圖](https://fakeimg.pl/500/)

> 此專案是一份 README 的撰寫範本,主要是方便所有人可以快速撰寫 README,讓大家可以更有方向的去寫出 README。
> This is an instruction that direct users to install automation testing software on their devices.。

- [線上觀看連結](https://israynotarray.com/)

## 功能
## Prerequisites
Node.js 18+

測試帳號密碼 **(請斟酌提供,建議只提供僅能觀看不能操作的帳號密碼)**
npm 9.6+

```bash
帳號: [email protected]
密碼: example
```
Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).

- [x] 登入
- [x] 登出
- [x] 產品列表
...
MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.

## 畫面
Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, with x86-64 or arm64 architecture.

> 可提供 1~3 張圖片,讓觀看者透過 README 了解整體畫面
Python 2.7 or above. The tutorial of installing Python with Visual Studio Code (https://code.visualstudio.com/docs/python/python-tutorial).

![範例圖片 1](https://fakeimg.pl/500/)
![範例圖片 2](https://fakeimg.pl/500/)
![範例圖片 3](https://fakeimg.pl/500/)

## 安裝

> 請務必依據你的專案來調整內容。

以下將會引導你如何安裝此專案到你的電腦上。

Node.js 版本建議為:`16.15.0` 以上...
## Installation in Visual Studio Code

### 取得專案
> Follow the instructions to install this automation test properly on your device.

```bash
git clone [email protected]:hsiangfeng/README-Example-Template.git
```

### 移動到專案內
### Get the project

```bash
cd README-Example-Template
git clone [email protected]
```
### Install Node.js
```bash
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
Getting started with writing end-to-end tests with Playwright:
Initializing project in '.'
√ Do you want to use TypeScript or JavaScript? · JavaScript
√ Where to put your end-to-end tests? · tests
√ Add a GitHub Actions workflow? (y/N) · false
√ Install Playwright browsers (can be done manually via 'npx playwright install')? (Y/n) · true
Initializing NPM project (npm init -y)…
Wrote to C:\Users\a0976\emu\package.json:

{
"name": "emu",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}

```
Installing Playwright Test (npm install --save-dev @playwright/test)…

### 安裝套件
### Install Playwright Packages

```bash
npm install
npm init playwright@latest
```

### 環境變數設定
### Check the validity

請在終端機輸入 `cp .env.example .env` 來複製 .env.example 檔案,並依據 `.env` 內容調整相關欄位。

### 運行專案
### Run the project approach 1

```bash
npm run serve
npm playw
```

### 開啟專案
### Test Result

在瀏覽器網址列輸入以下即可看到畫面

```bash
http://localhost:8080/
```

### Environment variables (Dotenv)

```bash
帳號: [email protected]
密碼: example
```

- [x] 登入
- [x] 登出
- [x] 產品列表
...




## 環境變數說明

```env
Expand Down