Documentation ¶
Overview ¶
Package k6 implements the module imported as 'k6' from inside k6.
Index ¶
- Variables
- type K6
- func (mi *K6) Check(arg0, checks sobek.Value, extras ...sobek.Value) (bool, error)
- func (mi *K6) Exports() modules.Exports
- func (*K6) Fail(msg string) (sobek.Value, error)
- func (mi *K6) Group(name string, val sobek.Value) (sobek.Value, error)
- func (mi *K6) RandomSeed(seed int64)
- func (mi *K6) Sleep(secs float64)
- type RootModule
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrGroupInInitContext is returned when group() are using in the init context. ErrGroupInInitContext = common.NewInitContextError("Using group() in the init context is not supported") // ErrCheckInInitContext is returned when check() are using in the init context. ErrCheckInInitContext = common.NewInitContextError("Using check() in the init context is not supported") )
Functions ¶
This section is empty.
Types ¶
type K6 ¶
type K6 struct {
// contains filtered or unexported fields
}
K6 represents an instance of the k6 module.
func (*K6) RandomSeed ¶ added in v0.22.0
RandomSeed sets the seed to the random generator used for this VU.
type RootModule ¶ added in v0.36.0
type RootModule struct{}
RootModule is the global module instance that will create module instances for each VU.
func New ¶ added in v0.18.0
func New() *RootModule
New returns a pointer to a new RootModule instance.
func (*RootModule) NewModuleInstance ¶ added in v0.36.0
func (*RootModule) NewModuleInstance(vu modules.VU) modules.Instance
NewModuleInstance implements the modules.Module interface to return a new instance for each VU.
Directories ¶
Path | Synopsis |
---|---|
Package browser is the browser module's entry point, and initializer of various global types, and a translation layer between sobek and the internal business logic.
|
Package browser is the browser module's entry point, and initializer of various global types, and a translation layer between sobek and the internal business logic. |
chromium
Package chromium is responsible for launching a Chrome browser process and managing its lifetime.
|
Package chromium is responsible for launching a Chrome browser process and managing its lifetime. |
common
Package common provides the main logic of the browser module.
|
Package common provides the main logic of the browser module. |
common/js
Package js provides JavaScript code that the browser module evaluates on the browser.
|
Package js provides JavaScript code that the browser module evaluates on the browser. |
env
Package env provides types to interact with environment setup.
|
Package env provides types to interact with environment setup. |
k6error
Package k6error contains ErrFatal.
|
Package k6error contains ErrFatal. |
k6ext
Package k6ext acts as an encapsulation layer between the k6 core and xk6-browser.
|
Package k6ext acts as an encapsulation layer between the k6 core and xk6-browser. |
k6ext/k6test
Package k6test provides mock implementations of k6 elements for testing purposes.
|
Package k6test provides mock implementations of k6 elements for testing purposes. |
keyboardlayout
Package keyboardlayout provides keyboard key interpretation and layout validation.
|
Package keyboardlayout provides keyboard key interpretation and layout validation. |
log
Package log provides logging for the browser module.
|
Package log provides logging for the browser module. |
storage
Package storage provides data storage for the extension and user specific data.
|
Package storage provides data storage for the extension and user specific data. |
tests
Package tests provides integration tests.
|
Package tests provides integration tests. |
tests/ws
Package ws provides a test WebSocket server.
|
Package ws provides a test WebSocket server. |
trace
Package trace provides tracing instrumentation tailored for k6 browser needs.
|
Package trace provides tracing instrumentation tailored for k6 browser needs. |
Package crypto provides common hashing function for the k6
|
Package crypto provides common hashing function for the k6 |
x509
Package x509 provides X.509 certificate parsing for the k6
|
Package x509 provides X.509 certificate parsing for the k6 |
Package data implements `k6/data` js module for k6.
|
Package data implements `k6/data` js module for k6. |
Package encoding provides encoding/decoding functionality for the k6
|
Package encoding provides encoding/decoding functionality for the k6 |
Package execution implements k6/execution which lets script find out more about it is execution.
|
Package execution implements k6/execution which lets script find out more about it is execution. |
Package experimental includes experimental module features
|
Package experimental includes experimental module features |
csv
Package csv provides a CSV parser for k6.
|
Package csv provides a CSV parser for k6. |
fs
Package fs provides a k6 module that allows users to interact with files from the local filesystem as per the [File API design document].
|
Package fs provides a k6 module that allows users to interact with files from the local filesystem as per the [File API design document]. |
streams
Package streams provides support for the Web Streams API.
|
Package streams provides support for the Web Streams API. |
Package grpc is the root module of the k6-grpc extension.
|
Package grpc is the root module of the k6-grpc extension. |
generated by js/modules/k6/html/gen/gen_elements.go; DO NOT EDIT
|
generated by js/modules/k6/html/gen/gen_elements.go; DO NOT EDIT |
gen
Package main - this package generates some of the code for k6/html
|
Package main - this package generates some of the code for k6/html |
Package http implements the k6/http js module for k6.
|
Package http implements the k6/http js module for k6. |
Package metrics implements k6/metrics and let script work with custom metrics.
|
Package metrics implements k6/metrics and let script work with custom metrics. |
Package timers is implementing setInterval setTimeout and co.
|
Package timers is implementing setInterval setTimeout and co. |
Package ws implements a k6/ws for k6.
|
Package ws implements a k6/ws for k6. |
Click to show internal directories.
Click to hide internal directories.