Merge pull request #4 from kimatata/readme

Readme
This commit is contained in:
Takeshi Kimata
2024-06-23 13:20:30 +09:00
committed by GitHub
35 changed files with 3666 additions and 1731 deletions

View File

@@ -1,10 +1,10 @@
# UnitTCMS
Open Source Test Case Management Web Application
Open Source Test Case Management System
## Demo
[https://unittcms.vercel.app](https://unittcms.vercel.app)
[https://unittcms.org](https://www.unittcms.org)
## Docs

View File

@@ -1,4 +1,4 @@
# UnitTCMS Backend
# unittcms Backend
## Install dependencies
@@ -11,7 +11,9 @@ npm install
Create `.env` File
```
NEXT_PUBLIC_BACKEND_ORIGIN=http://localhost:3001
FRONTEND_ORIGIN=http://localhost:8000
PORT=8001
SECRET_KEY=your-secret-key
```
## Set up database
@@ -23,7 +25,7 @@ npm run migrate
## Run the development server
```bash
npm run start
node --env-file=.env index.js
```
## Database operation command

View File

@@ -128,9 +128,11 @@ app.use('/home', homeIndexRoute);
const PORT = process.env.PORT || 8001;
app.listen(PORT, () => {
console.log(`UnitTCMS backend server is running on port ${PORT}`);
console.log(`origin ${frontendOrigin} is only allowed.`);
console.log(`Backend server is running on port ${PORT}`);
console.log(`Access from the frontend origin: ${frontendOrigin} is valid.`);
if (!process.env.SECRET_KEY) {
console.log(`[caution]: using default key to generate token. please set environment variable: 'SECRET_KEY'`);
console.log(
"[Warning]: Default key is used for token generation. Please set the environment variable 'SECRET_KEY'`."
);
}
});

View File

@@ -1,14 +1,12 @@
{
"name": "backend",
"name": "unittcms-backend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"private": true,
"scripts": {
"start": "node index",
"migrate": "bash scripts/migrate.sh",
"seed": "bash scripts/seed.sh",
"drop": "bash scripts/drop.sh",
"test": "echo \"Error: no test specified\" && exit 1"
"drop": "bash scripts/drop.sh"
},
"author": "",
"license": "ISC",

View File

@@ -1,4 +1,4 @@
{
"label": "Architecuture",
"position": 4
"position": 5
}

View File

@@ -1,7 +1,154 @@
---
sidebar_position: 3
sidebar_position: 1
---
# ER diagram
![ER](./img/er.svg)
```mermaid
erDiagram
users ||--o{ projects : "user has projects"
users ||--o{ members : "user has members"
projects ||--o{ members: "project has members"
projects ||--o{ folders: "project has folders"
projects ||--o{ runs: "project has runs"
projects ||--o{ "plans(unimplemented)": "project has plans"
"plans(unimplemented)" ||--o{ "planRuns(unimplemented)": "plan has planRuns"
runs ||--o{ "planRuns(unimplemented)": "run has planRuns"
folders ||--o{ cases: "folder has cases"
cases ||--o{ caseSteps: "has"
steps ||--o{ caseSteps: "has"
cases ||--o{ caseAttachments: "has"
attachments ||--o{ caseAttachments: "has"
cases ||--o{ "caseTags(unimplemented)": "has"
"tags(unimplemented)" ||--o{ "caseTags(unimplemented)": "has"
users {
integer id PK
string email
string password
string username
integer role
string avatarPath
timestamp created_at
timestamp deleted_at
}
projects {
integer id PK
string name
string detail
boolean isPublic
integer userId FK
timestamp created_at
timestamp deleted_at
}
members {
integer id PK
integer userId FK
integer projectID FK
integer role
}
folders {
integer id PK
string name
string detail
integer parentFolderId
integer projectId FK
timestamp created_at
timestamp deleted_at
}
runs {
integer id PK
string name
string configurations
string description
integer state
integer projectId FK
timestamp created_at
timestamp deleted_at
}
"plans(unimplemented)" {
integer id PK
string name
string description
timestamp startDate
timestamp endDate
integer projectId FK
timestamp created_at
timestamp deleted_at
}
"planRuns(unimplemented)" {
integer id PK
integer planId FK
integer runId FK
timestamp created_at
timestamp deleted_at
}
cases {
integer id PK
string title
integer state
integer priority
integer type
integer automationStatus
string description
integer template
string preConditions
string expectedResults
integer folderId FK
timestamp created_at
timestamp deleted_at
}
steps {
integer id PK
string step
string result
timestamp created_at
timestamp deleted_at
}
caseSteps {
integer id PK
integer caseId FK
integer stepId FK
integer stepNo
}
attachments {
integer id PK
string title
string detail
string path
timestamp created_at
timestamp deleted_at
}
caseAttachments {
integer id PK
integer caseId FK
integer attachmentId FK
}
"tags(unimplemented)" {
integer id PK
string name
integer projectId FK
timestamp created_at
timestamp deleted_at
}
"caseTags(unimplemented)" {
integer id PK
integer caseId FK
integer tagId FK
timestamp created_at
timestamp deleted_at
}
```

View File

@@ -1,17 +0,0 @@
---
sidebar_position: 2
---
## Functions
## MUST
- Test cases can be managed.
- Multiple people can operate/view apps for team development
## SHOULD
- Easily self host the application (docker?)
- Test case descriptions can be written in markdown.
- Import the results of automated testing tools (Vitest, Google Test...) and test them manually. Import the results of automated testing tools (Vitest, Google Test...) and integrate them with manual test results

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 63 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

View File

@@ -1,18 +0,0 @@
---
sidebar_position: 1
---
# Architecture
Separate the front-end server that provides the UI and the API server that provides the API to make the system loosely coupled.
## Frontend
Create UI with React, Next.js.
## Backend(API server)
It does not generate any views, but only has API functions.
- DB access
- Authentication, authorization

View File

@@ -13,13 +13,13 @@ Deploy the frontend to Vercel and the backend to Render.
#### Environment Variables
| key | value |
|-|-|
| -------------------------- | ---------------------------- |
| NEXT_PUBLIC_BACKEND_ORIGIN | `your backend server origin` |
#### Settings
| Settings | value |
|-|-|
| ---------------- | ---------- |
| Root Directory | `frontend` |
| Framework Preset | `Next.js` |
@@ -28,13 +28,13 @@ Deploy the frontend to Vercel and the backend to Render.
#### Environment Variables
| key | value |
|-|-|
| --------------- | ----------------------------- |
| FRONTEND_ORIGIN | `your frontend server origin` |
#### Settings
| Settings | value |
|-|-|
| -------------- | ------------------------------------------- |
| Root Directory | `backend` |
| Build Command | `npm ci && npm run migrate && npm run seed` |
|Start Command|`npm run index`|
| Start Command | `npm run start` |

View File

@@ -10,7 +10,7 @@ Prerequisite: v20 or higher node must be installed.
:::
To use UnitTCMS, you need run frontend server and backend server (API server).
To use UnitTCMS, you need run frontend server and backend(API) server.
First, clone the repository.
@@ -20,7 +20,7 @@ git clone git@github.com:kimatata/unittcms.git
## Run backend server
Moves to backend directory, then install dependencies.
Move to backend directory, then install dependencies.
```bash
cd backend
@@ -36,20 +36,26 @@ npm run migrate
Start backend server.
```bash
node index
npm run start
```
## Run frontend server
Moves to frontend directory, then install dependencies.
Move to frontend directory, then install dependencies.
```bash
cd frontend
npm install
```
Start frontend server
Build frontend code
```bash
rpm run dev
npm run dev
```
Start frontend server
```
PORT=8000 npm run start
```

View File

@@ -4,4 +4,4 @@ sidebar_position: 1
# UnitTCMS
Open Source Test Case Management Web Application
Open Source Test Case Management System

View File

@@ -0,0 +1,4 @@
{
"label": "Roadmap",
"position": 4
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 233 KiB

View File

@@ -1,14 +1,18 @@
---
sidebar_position: 4
sidebar_position: 2
---
# Integration
# Roadmap
We would like to be able to display results not only from manual test management, but also from automated test tools such as Vitest, Google Test, Selenium, etc.
## 📝markdown editor
Since the JUnit xml format is the de facto standard, we will import via the xml file. UnitTCMS itself should also be able to report manual test results in Junit XML format.
Test case details and steps can be edited with markdown
![integration](./img/integration.png)
## 📊JUnit xml integration
### JUnit xml report output
Since JUnit's xml format is the de facto standard, we would like to output reports in that format.
```xml title="Junit xml"
<?xml version="1.0" encoding="UTF-8"?>
@@ -34,3 +38,10 @@ Since the JUnit xml format is the de facto standard, we will import via the xml
</testsuite>
</testsuites>
```
### Importing and displaying Junit xml
We would like to be able to display not only manual test results, but also automated test results such as JUnit, Vitest, Selenium, etc.
Import the results of automated testing tools and integrate them with manual test results.
![integration](./img/integration.svg)

View File

@@ -4,7 +4,7 @@ sidebar_position: 1
# Roles
There are two types of roles in UnitTCMS: "Global roles" and "Project roles".
There are "Global roles," which are site-wide roles, and "project roles" which are project-specific roles.
## Global roles

View File

@@ -52,6 +52,11 @@ const config = {
],
],
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({

5030
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,18 +14,17 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "3.1.1",
"@docusaurus/preset-classic": "3.1.1",
"@docusaurus/core": "^3.4.0",
"@docusaurus/module-type-aliases": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@docusaurus/theme-mermaid": "^3.4.0",
"@docusaurus/types": "^3.4.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.1",
"@docusaurus/types": "3.1.1"
},
"browserslist": {
"production": [
">0.5%",

View File

@@ -1,7 +1,6 @@
import clsx from 'clsx';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import Heading from '@theme/Heading';
import styles from './index.module.css';
@@ -13,15 +12,13 @@ export default function Home() {
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
UnitTCMS
UnitTCMS Docs
</Heading>
<p className="hero__subtitle">Open Source Test Case Management Web Application</p>
<p className="hero__subtitle">Open Source Test Case Management System</p>
Integrate and manage all your software testing.
</div>
</header>
<main>
<HomepageFeatures />
</main>
<main></main>
</Layout>
);
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 1024 1024" class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M769.954 819.164V428.239H640.67v390.926c-0.658 3.571-1.154 7.199-1.154 10.95 0 34.756 29.458 62.931 65.796 62.931 36.337 0 65.796-28.175 65.796-62.931 0.001-3.752-0.495-7.38-1.154-10.951z" fill="#FCE3C3" /><path d="M705.312 905.545c-43.173 0-78.297-33.838-78.297-75.431 0-3.723 0.358-7.484 1.154-12.061V415.739h154.284v402.314c0.796 4.577 1.154 8.338 1.154 12.061 0.001 41.593-35.122 75.431-78.295 75.431zM653.17 440.739v379.567l-0.207 1.123c-0.655 3.555-0.947 6.233-0.947 8.685 0 27.808 23.909 50.431 53.297 50.431s53.296-22.623 53.296-50.431c0-2.451-0.292-5.13-0.947-8.685l-0.207-1.123V440.739H653.17z" fill="#300604" /><path d="M615.467 351.284h178.535v76.955H615.467z" fill="#FCE3C3" /><path d="M806.502 440.739H602.967V338.784h203.535v101.955z m-178.535-25h153.535v-51.955H627.967v51.955z" fill="#300604" /><path d="M539.795 471.496V371.292H424.363v100.203c-90.544 25.211-156.988 108.265-156.988 206.846 0 118.577 96.126 214.704 214.704 214.704 118.577 0 214.704-96.126 214.704-214.704 0-98.581-66.444-181.634-156.988-206.845z" fill="#FCE3C3" /><path d="M539.795 371.292v100.203c90.544 25.211 156.988 108.265 156.988 206.846 0 118.577-96.126 214.704-214.704 214.704s-214.704-96.126-214.704-214.704c0-98.581 66.444-181.635 156.988-206.846V371.292h115.432m0-25H424.363l-25 25v82.016a238.625 238.625 0 0 0-51.769 26.596 240.415 240.415 0 0 0-55.48 52.24c-15.809 20.512-28.11 43.271-36.562 67.644-8.743 25.214-13.176 51.643-13.176 78.554 0 32.349 6.341 63.743 18.847 93.311 12.074 28.547 29.354 54.179 51.36 76.185s47.638 39.286 76.185 51.36c29.568 12.506 60.963 18.847 93.311 18.847s63.743-6.341 93.311-18.847c28.547-12.074 54.179-29.354 76.185-51.36s39.286-47.638 51.36-76.185c12.506-29.568 18.847-60.962 18.847-93.311 0-26.911-4.433-53.341-13.176-78.554-8.452-24.373-20.753-47.132-36.562-67.644a240.415 240.415 0 0 0-55.48-52.24 238.625 238.625 0 0 0-51.769-26.596v-82.016l-25-25z" fill="#300604" /><path d="M385.116 297.416h193.926v73.877H385.116z" fill="#FCE3C3" /><path d="M591.542 383.792H372.616v-98.876h218.926v98.876z m-193.926-25h168.926v-48.876H397.616v48.876z" fill="#300604" /><path d="M323.488 678.342c0 87.588 71.003 158.592 158.591 158.592S640.67 765.929 640.67 678.342c0-9.723-1.009-19.196-2.684-28.436H326.172c-1.675 9.24-2.684 18.713-2.684 28.436z" fill="#B12800" /><path d="M482.078 846.934c-92.961 0-168.59-75.63-168.59-168.592 0-9.777 0.931-19.662 2.844-30.22l1.489-8.217h328.516l1.489 8.217c1.913 10.558 2.844 20.442 2.844 30.22 0 92.962-75.63 168.592-168.592 168.592zM334.725 659.905c-0.83 6.335-1.236 12.423-1.236 18.437 0 81.934 66.657 148.592 148.59 148.592 81.934 0 148.592-66.658 148.592-148.592 0-6.014-0.406-12.102-1.236-18.437h-294.71z" fill="#300604" /><path d="M502.079 627.552h-40l0.001-367.232c0.023-3.033 0.714-30.437 17.309-58.502 15.726-26.598 48.718-58.303 116.583-58.303 66.879 0 100.071 26.471 116.139 48.677 17.749 24.53 18.82 48.951 18.884 51.655l0.006 0.471V546.75h-40V244.817c-0.135-1.835-1.537-16.537-12.377-30.626-15.662-20.355-43.47-30.677-82.651-30.677-38.7 0-66.089 12.592-81.405 37.426-11.579 18.772-12.442 38.415-12.487 39.749v366.863zM342.136 614.94l-18.707-7.074c0.972-2.581 24.672-63.586 100.015-96.447l7.996 18.332c-67.279 29.344-89.091 84.634-89.304 85.189z" fill="#300604" /></svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.8 KiB

View File

@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 1024 1024" class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M600.053 197.532h51.929v216.934h-51.929z" fill="#B12800" /><path d="M651.981 423.987h-51.929l-9.519-9.519V197.534l9.519-9.519h51.929l9.519 9.519v216.934l-9.519 9.519z m-42.409-19.039h32.89V207.053h-32.89v197.895z" fill="#B12800" /><path d="M345.504 479.26h51.929v335.675h-51.929z" fill="#ED8F27" /><path d="M397.432 824.456h-51.929l-9.519-9.519V479.262l9.519-9.519h51.929l9.519 9.519v335.674l-9.519 9.52z m-42.409-19.039h32.89V488.782h-32.89v316.635z" fill="#ED8F27" /><path d="M218.23 598.001h51.929v216.934H218.23z" fill="#B12800" /><path d="M270.161 824.456h-51.929l-9.519-9.519V598.003l9.519-9.519h51.929l9.519 9.519v216.934l-9.519 9.519z m-42.41-19.039h32.89V607.522h-32.89v197.895z" fill="#B12800" /><path d="M472.779 814.935h51.928v-82.382l-51.928-47.09z" fill="#FCE3C3" /><path d="M524.71 824.456h-51.929l-9.519-9.519V577.12l15.916-7.053L531.106 725.5l3.124-101.288v190.724l-9.52 9.52z m-42.41-19.039h32.891v-68.646L482.3 706.945v98.472z" fill="#FCE3C3" /><path d="M472.779 556.371v46.009l51.928 47.671v-93.68z" fill="#FCE3C3" /><path d="M518.271 657.065l-51.929-47.674-3.08-7.012v-46.008l9.519-9.519h51.929l9.519 9.519v93.682l-15.958 7.012z m-35.971-58.87l32.891 30.194V565.89H482.3v32.305z" fill="#FCE3C3" /><path d="M604.313 414.432h47.668l0.374 163.991 154.64 61.862 0.773 160.83-45.815 44.548H596.859v-40.246L474.839 689.49l36.916-44.72 88.298 74.449z" fill="#FCE3C3" /><path d="M727.328 438.909V608.76l51.927 21.637V438.909z" fill="#228E9D" /><path d="M775.591 639.185l-51.929-21.636-5.857-8.788V438.91l9.519-9.519h51.929l9.519 9.519v191.487l-13.181 8.788z m-38.747-36.77l32.89 13.703V448.43h-32.89v153.985z" fill="#228E9D" /><path d="M398.548 340.652h-19.039v-77.524h-77.524v-19.039h87.044l9.519 9.519z" fill="#300604" /><path d="M382.297 246.874l13.46 13.46L242.913 413.18l-13.46-13.461zM771.822 850.287l-13.461-13.461 39.888-39.89V648.624l-136.748-56.98v53.76h-19.039V423.987h-32.89v295.232l-15.958 7.013-81.92-71.626-26.873 33.001 121.627 106.217 3.124 7.054v44.786h-19.039v-40.569L465.342 695.648l-0.985-13.064 38.952-47.832 13.82-1.001 73.404 63.808V414.467l9.52-9.519h51.928l9.52 9.519v156.552L811.43 633.49l5.857 8.788v158.6l-2.789 6.73z" fill="#300604" /><path d="M570.842 845.663h236.926v43.277H570.842z" fill="#B12800" /><path d="M817.287 898.46H561.325v-62.315h255.962v62.315z m-236.923-19.039h217.885v-24.238H580.364v24.238z" fill="#300604" /><path d="M775.095 719.219h-19.039v-39.01l-45.105-22.955 8.639-16.969 50.305 25.605 5.2 8.484z" fill="#300604" /></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -1,4 +1,4 @@
# UnitTCMS Frontend
# unittcms Frontend
## Install dependencies
@@ -11,7 +11,7 @@ npm install
Create `.env` File
```
NEXT_PUBLIC_BACKEND_ORIGIN=http://localhost:3001
NEXT_PUBLIC_BACKEND_ORIGIN=http://localhost:8001
```
## Run the development server

View File

@@ -2,8 +2,7 @@
"Index": {
"get_started": "Get Started",
"demo": "Demo",
"oss_tcmt": "Open Source Test Case Management",
"web_application": "Web Application",
"oss_tcms": "Open Source Test Case Management System",
"integrate_and_manage": "Integrate and manage all your software testing.",
"oss_title": "Open Source",
"oss_detail": "UnitTCMS is free and open source. The application can be self-hosted. It can be deployed in environments with strict security requirements.",
@@ -19,7 +18,7 @@
"case_run": "Test Runs"
},
"Header": {
"title": "Open Source Test Case Management Tool",
"title": "Open Source Test Case Management System",
"description": "Integrate and manage all your software testing",
"docs": "Docs",
"projects": "Projects",

View File

@@ -2,8 +2,7 @@
"Index": {
"get_started": "テスト管理を始める",
"demo": "デモ",
"oss_tcmt": "オープンソーステストケース管理",
"web_application": "ウェブアプリケーション",
"oss_tcms": "オープンソーステストケース管理システム",
"integrate_and_manage": "ソフトウェア開発にかかわるすべてのテストを統合管理",
"oss_title": "オープンソース",
"oss_detail": "UnitTCMSは無料でオープンソースです。アプリケーションをセルフホストすることができます。セキュリティ要件の厳しい環境でも導入することができます。",
@@ -19,7 +18,7 @@
"case_run": "テストラン"
},
"Header": {
"title": "オープンソーステストケース管理ツール",
"title": "オープンソーステストケース管理システム",
"description": "ソフトウェア開発にかかわるすべてのテストを統合管理",
"docs": "ドキュメント",
"projects": "プロジェクト",

View File

@@ -1,6 +1,6 @@
{
"name": "next-app-template",
"version": "0.0.1",
"name": "unittcms-frontend",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev -p 8000",

View File

@@ -86,7 +86,7 @@ export default function HeaderNavbarMenu({ messages, locale }: Props) {
<NavbarItem className="hidden md:block">
<Chip size="sm" variant="flat">
<Link className="data-[active=true]:text-primary data-[active=true]:font-medium" href="/" locale={locale}>
1.0.0-alpha.12
1.0.0-alpha.13
</Link>
</Chip>
</NavbarItem>

View File

@@ -28,9 +28,7 @@ export default function MainTitle({ locale }: Props) {
class: 'lg:text-5xl md:text-5xl sm:text-5xl text-5xl',
})}
>
{t('oss_tcmt')}
<br />
{t('web_application')}
{t('oss_tcms')}
</h1>
<h4 className={subtitle({ class: 'mt-4' })}>{t('integrate_and_manage')}</h4>

View File

@@ -1,5 +1,5 @@
{
"name": "UnitTCMS",
"name": "unittcms",
"version": "1.0.0",
"private": true,
"scripts": {