Skip to content

Commit

Permalink
adding first new api tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWollbrink committed Oct 2, 2024
1 parent bfe41ae commit 34a8169
Show file tree
Hide file tree
Showing 3 changed files with 1,543 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/run_newman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: newman_tests

on:
#push
#workflow_dispatch

jobs:
api-test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install Newman and HTML Reporter
run: |
npm install -g [email protected]
npm install -g [email protected]
- name: Restore dependencies
run: dotnet restore ./src/AasxServerBlazor/AasxServerBlazor.csproj
- name: Build
run: dotnet build ./src/AasxServerBlazor/AasxServerBlazor.csproj -c Release -o ./build
- name: Start Test Server And Execute Test Scripts
run: |
cd build
dotnet ./AasxServerBlazor.dll --aspnet --data-path ../test/rest_api/data &
sleep 10
cd ..
newman run ./test/rest_api/postman/SubmodelElementTest.json.postman_collection -e ./test/rest_api/postman/GitHubActionEnvironment.json.postman_environment --reporters cli,htmlextra --reporter-htmlextra-export report.html --insecure
kill -9 `lsof -i:5001 -t`
- name: Upload Report
uses: actions/upload-artifact@v2
if: always()
with:
name: report.html
path: ./report.html
Binary file added test/rest_api/data/TestData.aasx
Binary file not shown.
Loading

0 comments on commit 34a8169

Please sign in to comment.