Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: exclude threshold tests from all tests #1685

Merged
merged 9 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 3 additions & 3 deletions .github/workflows/ci-cd-yt01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ jobs:
max-parallel: 1
matrix:
files:
- tests/k6/tests/serviceowner/serviceOwnerSearchWithThresholds.js
- tests/k6/tests/serviceowner/createDialogWithThresholds.js
- tests/k6/tests/enduser/enduserSearchWithThresholds.js
- tests/k6/tests/serviceowner/performance/serviceOwnerSearchWithThresholds.js
- tests/k6/tests/serviceowner/performance/createDialogWithThresholds.js
- tests/k6/tests/enduser/performance/enduserSearchWithThresholds.js
fail-fast: false
with:
environment: yt01
Expand Down
20 changes: 11 additions & 9 deletions tests/k6/scripts/generate_all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ FUNCTION_BODY=""

# Get all *.js files in the directory except for "all-tests.js"
for JS_FILE in "$DIRECTORY_PATH"/*.js; do
BASE_NAME=$(basename "$JS_FILE" .js)

if [[ "$BASE_NAME" != "all-tests" ]]; then
# Append to import strings
IMPORT_STATEMENTS="${IMPORT_STATEMENTS}import { default as ${BASE_NAME} } from './${BASE_NAME}.js';"$'\n'

# Append to function body
FUNCTION_BODY="${FUNCTION_BODY} ${BASE_NAME}();"$'\n'
if [[ $DIRECTORY_PATH != *"performance"* ]]; then
BASE_NAME=$(basename "$JS_FILE" .js)

if [[ "$BASE_NAME" != "all-tests" ]]; then
# Append to import strings
IMPORT_STATEMENTS="${IMPORT_STATEMENTS}import { default as ${BASE_NAME} } from './${BASE_NAME}.js';"$'\n'

# Append to function body
FUNCTION_BODY="${FUNCTION_BODY} ${BASE_NAME}();"$'\n'
fi
fi
done

Expand All @@ -33,6 +35,6 @@ export default function() {
${FUNCTION_BODY}}"

# Output the script content to "all-tests.js"
echo "$SCRIPT_CONTENT" > "${DIRECTORY_PATH}/all-tests.js"
echo "$SCRIPT_CONTENT" >"${DIRECTORY_PATH}/all-tests.js"

echo "all-tests.js has been generated successfully."
2 changes: 0 additions & 2 deletions tests/k6/tests/enduser/all-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
import { default as dialogDetails } from './dialogDetails.js';
import { default as dialogSearch } from './dialogSearch.js';
import { default as dialogSystemLabelLog } from './dialogSystemLabelLog.js';
import { default as enduserSearchWithThresholds } from './enduserSearchWithThresholds.js';
import { default as parties } from './parties.js';

export default function() {
dialogDetails();
dialogSearch();
dialogSystemLabelLog();
enduserSearchWithThresholds();
oskogstad marked this conversation as resolved.
Show resolved Hide resolved
parties();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { default as run } from "./performance/enduser-search.js";
import { default as run } from "./enduser-search.js";

export let options = {
summaryTrendStats: ['avg', 'min', 'med', 'max', 'p(95)', 'p(99)', 'p(99.5)', 'p(99.9)', 'count'],
Expand Down
2 changes: 0 additions & 2 deletions tests/k6/tests/performancetest_data/endusers-localdev.csv

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions tests/k6/tests/serviceowner/all-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { default as authentication } from './authentication.js';
import { default as authorization } from './authorization.js';
import { default as concurrency } from './concurrency.js';
import { default as createDialogWithThresholds } from './createDialogWithThresholds.js';
import { default as dialogCreateActivity } from './dialogCreateActivity.js';
import { default as dialogCreateExternalResource } from './dialogCreateExternalResource.js';
import { default as dialogCreateInvalidActionCount } from './dialogCreateInvalidActionCount.js';
Expand All @@ -12,13 +11,11 @@ import { default as dialogCreateUpdatePatchDeleteCorrespondenceResource } from '
import { default as dialogDetails } from './dialogDetails.js';
import { default as dialogSearch } from './dialogSearch.js';
import { default as dialogUpdateActivity } from './dialogUpdateActivity.js';
import { default as serviceOwnerSearchWithThresholds } from './serviceOwnerSearchWithThresholds.js';

export default function() {
authentication();
authorization();
concurrency();
createDialogWithThresholds();
dialogCreateActivity();
dialogCreateExternalResource();
dialogCreateInvalidActionCount();
Expand All @@ -28,5 +25,4 @@ export default function() {
dialogDetails();
dialogSearch();
dialogUpdateActivity();
serviceOwnerSearchWithThresholds();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { default as run } from "./performance/create-dialog.js";
import { default as run } from "./create-dialog.js";

export let options = {
summaryTrendStats: ['avg', 'min', 'med', 'max', 'p(95)', 'p(99)', 'p(99.5)', 'p(99.9)', 'count'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { default as run } from "./performance/serviceowner-search.js";
import { default as run } from "./serviceowner-search.js";

export let options = {
summaryTrendStats: ['avg', 'min', 'med', 'max', 'p(95)', 'p(99)', 'p(99.5)', 'p(99.9)', 'count'],
Expand Down
Loading