Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yschindel committed Jan 22, 2025
1 parent 4f56e1e commit 699c04d
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,24 @@ go mod tidy
2. Add an IFC file to the `assets` directory.
3. Rename the file to `test.ifc`.

## Running the Tests
## Test Setup

### Start the Azure SQL Server Emulator

Use the 'mssql' extension in VSCode to start the Azure SQL Server Emulator.
Follow the instructions in this video closely: https://www.youtube.com/watch?v=3XgepwpBJP8

Basic steps:
Go to the Database Projects section of the 'mssql' extension in VSCode.
Right click on the project and select 'Build'. >> follow the video tutorial
Right click on the project and select 'Publish'. >> follow the video tutorial

Switch to the 'SQL Server' tab in VSCode.
Connect to the Azure SQL Server Emulator. Skip all optionals inputs, use 'sa' as the username and provide a password.

Open the project_data.sql file.
In the bottom right corner of VSCode where it says 'Disconnect', click on it and connect to the emulator. make sure to select the 'sa' user and later the right 'database' or whatever it is called. Choose (nhmzh-viz-services-localdev) as the database.
Run 'project_data.sql' to create the database table.

Open a new terminal window in the `integration-tests` directory:

Expand All @@ -39,6 +56,10 @@ Run the following command to start the services:
docker compose up --build -d
```

You should now have one container running for the Azure SQL Server Emulator and a contaier group (or however that is called) running for all the integration tests services.

## Running the IFC Integration Tests

### Open the MinIO Console

In your browser, go to `localhost:9001` to see the MinIO console.
Expand Down Expand Up @@ -70,6 +91,12 @@ Verify that the bucket was created and that the content was added correctly:
3. Open the buckets. If no folders show up, try refreshing the bucket.
4. Open the folders and check that the files are present.

### Verify the viz_pbi-server is Working

Check the output of the test.ts in the terminal. It should say: "Pass: Fragments file is a Buffer".

## Running the LCA and Cost Integration Tests

### Add content to the LCA and Cost Kafka topic

Open a terminal in the `integration-tests/lca_cost` directory and run:
Expand All @@ -80,13 +107,4 @@ go run main.go

**Verify the content was added correctly:**

Verify that the bucket was created and that the content was added correctly:

1. Refresh the Object Browser in the MinIO console.
2. You should see a bucket called `lca-cost-data`.
3. Open the bucket. If no folders show up, try refreshing the bucket.
4. Open the folders and check that the files are present.

### Verify the viz_pbi-server is Working

Check the output of the test.ts in the terminal. It should say: "Pass: Fragments file is a Buffer".
In the (VS Code) environment where you set up the Azure SQL Server Emulator, go to the SQL Server Explorer.

0 comments on commit 699c04d

Please sign in to comment.