Skip to content

Instantly share code, notes, and snippets.

@gvc
Created June 27, 2024 16:31
Show Gist options
  • Save gvc/c33fefa79435c5e1de7d82fdf0d99042 to your computer and use it in GitHub Desktop.
Save gvc/c33fefa79435c5e1de7d82fdf0d99042 to your computer and use it in GitHub Desktop.
starter-2024-06-27
// Creator: k6 Browser Recorder 0.6.2
import { sleep, group } from 'k6'
import http from 'k6/http'
export default function main() {
let response
group('page_1 - https://starter.vtex.app/', function () {
response = http.get(
'https://starter.vtex.app/api/graphql?operationName=ClientShippingSimulationQuery&operationHash=d6667f1de2a26b94b9b55f4b25d7d823f82635a0&variables=%7B%22items%22%3A%5B%7B%22id%22%3A%229009169%22%2C%22quantity%22%3A1%2C%22seller%22%3A%221%22%7D%5D%2C%22postalCode%22%3A%2294102%22%2C%22country%22%3A%22USA%22%7D',
{
headers: {
dnt: '1',
'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
},
}
)
response = http.get(
'https://starter.vtex.app/api/graphql?operationName=ClientSearchSuggestionsQuery&operationHash=a8a27661f6a032e086c047339e0d0f180f0e0161&variables=%7B%22term%22%3A%22%22%2C%22selectedFacets%22%3A%5B%7B%22key%22%3A%22channel%22%2C%22value%22%3A%22%7B%5C%22salesChannel%5C%22%3A%5C%221%5C%22%2C%5C%22regionId%5C%22%3A%5C%22v2.4325C29BA00E6470CBA54999680076F9%5C%22%2C%5C%22hasOnlyDefaultSalesChannel%5C%22%3Afalse%7D%22%7D%2C%7B%22key%22%3A%22locale%22%2C%22value%22%3A%22en-US%22%7D%5D%7D',
{
headers: {
dnt: '1',
'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
},
}
)
response = http.get(
'https://starter.vtex.app/api/graphql?operationName=ClientManyProductsQuery&operationHash=c0d7d2ae1d5aaae5d50eea683b389377c36fb57d&variables=%7B%22first%22%3A5%2C%22after%22%3A%220%22%2C%22sort%22%3A%22score_desc%22%2C%22term%22%3A%22%22%2C%22selectedFacets%22%3A%5B%7B%22key%22%3A%22view%22%2C%22value%22%3A%2214149572%22%7D%2C%7B%22key%22%3A%22channel%22%2C%22value%22%3A%22%7B%5C%22salesChannel%5C%22%3A%5C%221%5C%22%2C%5C%22regionId%5C%22%3A%5C%22v2.4325C29BA00E6470CBA54999680076F9%5C%22%2C%5C%22hasOnlyDefaultSalesChannel%5C%22%3Afalse%7D%22%7D%2C%7B%22key%22%3A%22locale%22%2C%22value%22%3A%22en-US%22%7D%5D%7D',
{
headers: {
dnt: '1',
'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
},
}
)
response = http.get(
'https://starter.vtex.app/api/graphql?operationName=ClientManyProductsQuery&operationHash=c0d7d2ae1d5aaae5d50eea683b389377c36fb57d&variables=%7B%22first%22%3A5%2C%22after%22%3A%220%22%2C%22sort%22%3A%22score_desc%22%2C%22term%22%3A%22%22%2C%22selectedFacets%22%3A%5B%7B%22key%22%3A%22buy%22%2C%22value%22%3A%2214149572%22%7D%2C%7B%22key%22%3A%22channel%22%2C%22value%22%3A%22%7B%5C%22salesChannel%5C%22%3A%5C%221%5C%22%2C%5C%22regionId%5C%22%3A%5C%22v2.4325C29BA00E6470CBA54999680076F9%5C%22%2C%5C%22hasOnlyDefaultSalesChannel%5C%22%3Afalse%7D%22%7D%2C%7B%22key%22%3A%22locale%22%2C%22value%22%3A%22en-US%22%7D%5D%7D',
{
headers: {
dnt: '1',
'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
},
}
)
response = http.get(
'https://starter.vtex.app/api/graphql?operationName=ClientProductQuery&operationHash=cedeb0c3e7ec1678400fe2ae930f5a79382fba1e&variables=%7B%22locator%22%3A%5B%7B%22key%22%3A%22id%22%2C%22value%22%3A%229009169%22%7D%2C%7B%22key%22%3A%22channel%22%2C%22value%22%3A%22%7B%5C%22salesChannel%5C%22%3A%5C%221%5C%22%2C%5C%22regionId%5C%22%3A%5C%22v2.4325C29BA00E6470CBA54999680076F9%5C%22%2C%5C%22hasOnlyDefaultSalesChannel%5C%22%3Afalse%7D%22%7D%2C%7B%22key%22%3A%22locale%22%2C%22value%22%3A%22en-US%22%7D%5D%7D',
{
headers: {
dnt: '1',
'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
},
}
)
sleep(0.8)
response = http.get(
'https://starter.vtex.app/api/graphql?operationName=ClientShippingSimulationQuery&operationHash=d6667f1de2a26b94b9b55f4b25d7d823f82635a0&variables=%7B%22items%22%3A%5B%7B%22id%22%3A%229009169%22%2C%22quantity%22%3A1%2C%22seller%22%3A%221%22%7D%5D%2C%22postalCode%22%3A%2294102%22%2C%22country%22%3A%22USA%22%7D',
{
headers: {
dnt: '1',
'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
},
}
)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment