Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitesh411 authored Oct 20, 2024
1 parent fcaabd6 commit f3e15a5
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
import http from 'k6/http';
// This will export to HTML as filename "result.html" AND also stdout using the text summary json=results.json
import { htmlReport } from "https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js";
import { textSummary } from "https://jslib.k6.io/k6-summary/0.1.0/index.js";
import { check, sleep } from 'k6';

export const options ={
vus: 5,
duration: '3s'
}
export default function () {
const res =http.get('https://mitesh411.github.io/MyResume/');
check(res,{'Status was 200': r => r.status == 200});
sleep(1);
}
export const options = {
iterations: 1,
};

export function handleSummary(data){
return {
'index.html': htmlReporter(data),
stdout: textSummary(data, { indent: " ", enableColors: true }),
}
}
export default function () {
const response = http.get('https://test-api.k6.io/public/crocodiles/');
}

0 comments on commit f3e15a5

Please sign in to comment.