Best K6 code snippet using metrics.RegisterBuiltinMetrics
module_loading_test.go
Source:module_loading_test.go
...96 `, fs, lib.RuntimeOptions{CompatibilityMode: null.StringFrom("extended")})97 require.NoError(t, err)98 arc := r1.MakeArchive()99 registry := metrics.NewRegistry()100 builtinMetrics := metrics.RegisterBuiltinMetrics(registry)101 r2, err := NewFromArchive(&lib.RuntimeState{102 Logger: testutils.NewLogger(t),103 BuiltinMetrics: builtinMetrics,104 Registry: registry,105 }, arc)106 require.NoError(t, err)107 runners := map[string]*Runner{"Source": r1, "Archive": r2}108 for name, r := range runners {109 r := r110 t.Run(name, func(t *testing.T) {111 t.Parallel()112 ch := newDevNullSampleChannel()113 defer close(ch)114 initVU, err := r.NewVU(1, 1, ch)115 ctx, cancel := context.WithCancel(context.Background())116 defer cancel()117 vu := initVU.Activate(&lib.VUActivationParams{RunContext: ctx})118 require.NoError(t, err)119 err = vu.RunOnce()120 require.NoError(t, err)121 })122 }123 })124 }125}126func TestLoadExportsIsUsableInModule(t *testing.T) {127 t.Parallel()128 fs := afero.NewMemMapFs()129 require.NoError(t, afero.WriteFile(fs, "/A.js", []byte(`130 export function A() {131 return "A";132 }133 export function B() {134 return exports.A() + "B";135 }136 `), os.ModePerm))137 r1, err := getSimpleRunner(t, "/script.js", `138 import { A, B } from "./A.js";139 export default function(data) {140 if (A() != "A") {141 throw new Error("wrong value of A() " + A());142 }143 if (B() != "AB") {144 throw new Error("wrong value of B() " + B());145 }146 }147 `, fs, lib.RuntimeOptions{CompatibilityMode: null.StringFrom("extended")})148 require.NoError(t, err)149 arc := r1.MakeArchive()150 registry := metrics.NewRegistry()151 builtinMetrics := metrics.RegisterBuiltinMetrics(registry)152 r2, err := NewFromArchive(153 &lib.RuntimeState{154 Logger: testutils.NewLogger(t),155 BuiltinMetrics: builtinMetrics,156 Registry: registry,157 }, arc)158 require.NoError(t, err)159 runners := map[string]*Runner{"Source": r1, "Archive": r2}160 for name, r := range runners {161 r := r162 t.Run(name, func(t *testing.T) {163 t.Parallel()164 ch := newDevNullSampleChannel()165 defer close(ch)166 initVU, err := r.NewVU(1, 1, ch)167 ctx, cancel := context.WithCancel(context.Background())168 defer cancel()169 vu := initVU.Activate(&lib.VUActivationParams{RunContext: ctx})170 require.NoError(t, err)171 err = vu.RunOnce()172 require.NoError(t, err)173 })174 }175}176func TestLoadDoesntBreakHTTPGet(t *testing.T) {177 t.Parallel()178 // This test that functions such as http.get which require context still work if they are called179 // inside script that is imported180 tb := httpmultibin.NewHTTPMultiBin(t)181 fs := afero.NewMemMapFs()182 require.NoError(t, afero.WriteFile(fs, "/A.js", []byte(tb.Replacer.Replace(`183 import http from "k6/http";184 export function A() {185 return http.get("HTTPBIN_URL/get");186 }187 `)), os.ModePerm))188 r1, err := getSimpleRunner(t, "/script.js", `189 import { A } from "./A.js";190 export default function(data) {191 let resp = A();192 if (resp.status != 200) {193 throw new Error("wrong status "+ resp.status);194 }195 }196 `, fs, lib.RuntimeOptions{CompatibilityMode: null.StringFrom("extended")})197 require.NoError(t, err)198 require.NoError(t, r1.SetOptions(lib.Options{Hosts: tb.Dialer.Hosts}))199 arc := r1.MakeArchive()200 registry := metrics.NewRegistry()201 builtinMetrics := metrics.RegisterBuiltinMetrics(registry)202 r2, err := NewFromArchive(203 &lib.RuntimeState{204 Logger: testutils.NewLogger(t),205 BuiltinMetrics: builtinMetrics,206 Registry: registry,207 }, arc)208 require.NoError(t, err)209 runners := map[string]*Runner{"Source": r1, "Archive": r2}210 for name, r := range runners {211 r := r212 t.Run(name, func(t *testing.T) {213 t.Parallel()214 ch := newDevNullSampleChannel()215 defer close(ch)216 initVU, err := r.NewVU(1, 1, ch)217 require.NoError(t, err)218 ctx, cancel := context.WithCancel(context.Background())219 defer cancel()220 vu := initVU.Activate(&lib.VUActivationParams{RunContext: ctx})221 err = vu.RunOnce()222 require.NoError(t, err)223 })224 }225}226func TestLoadGlobalVarsAreNotSharedBetweenVUs(t *testing.T) {227 t.Parallel()228 fs := afero.NewMemMapFs()229 require.NoError(t, afero.WriteFile(fs, "/A.js", []byte(`230 var globalVar = 0;231 export function A() {232 globalVar += 1233 return globalVar;234 }235 `), os.ModePerm))236 r1, err := getSimpleRunner(t, "/script.js", `237 import { A } from "./A.js";238 export default function(data) {239 var a = A();240 if (a == 1) {241 a = 2;242 } else {243 throw new Error("wrong value of a " + a);244 }245 }246 `, fs, lib.RuntimeOptions{CompatibilityMode: null.StringFrom("extended")})247 require.NoError(t, err)248 arc := r1.MakeArchive()249 registry := metrics.NewRegistry()250 builtinMetrics := metrics.RegisterBuiltinMetrics(registry)251 r2, err := NewFromArchive(252 &lib.RuntimeState{253 Logger: testutils.NewLogger(t),254 BuiltinMetrics: builtinMetrics,255 Registry: registry,256 }, arc)257 require.NoError(t, err)258 runners := map[string]*Runner{"Source": r1, "Archive": r2}259 for name, r := range runners {260 r := r261 t.Run(name, func(t *testing.T) {262 t.Parallel()263 ch := newDevNullSampleChannel()264 defer close(ch)265 initVU, err := r.NewVU(1, 1, ch)266 require.NoError(t, err)267 ctx, cancel := context.WithCancel(context.Background())268 defer cancel()269 vu := initVU.Activate(&lib.VUActivationParams{RunContext: ctx})270 err = vu.RunOnce()271 require.NoError(t, err)272 // run a second VU273 initVU, err = r.NewVU(2, 2, ch)274 require.NoError(t, err)275 ctx, cancel = context.WithCancel(context.Background())276 defer cancel()277 vu = initVU.Activate(&lib.VUActivationParams{RunContext: ctx})278 err = vu.RunOnce()279 require.NoError(t, err)280 })281 }282}283func TestLoadCycle(t *testing.T) {284 t.Parallel()285 // This is mostly the example from https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/286 fs := afero.NewMemMapFs()287 require.NoError(t, afero.WriteFile(fs, "/counter.js", []byte(`288 let message = require("./main.js").message;289 exports.count = 5;290 export function a() {291 return message;292 }293 `), os.ModePerm))294 require.NoError(t, afero.WriteFile(fs, "/main.js", []byte(`295 let counter = require("./counter.js");296 let count = counter.count;297 let a = counter.a;298 let message= "Eval complete";299 exports.message = message;300 export default function() {301 if (count != 5) {302 throw new Error("Wrong value of count "+ count);303 }304 let aMessage = a();305 if (aMessage != message) {306 throw new Error("Wrong value of a() "+ aMessage);307 }308 }309 `), os.ModePerm))310 data, err := afero.ReadFile(fs, "/main.js")311 require.NoError(t, err)312 r1, err := getSimpleRunner(t, "/main.js", string(data), fs, lib.RuntimeOptions{CompatibilityMode: null.StringFrom("extended")})313 require.NoError(t, err)314 arc := r1.MakeArchive()315 registry := metrics.NewRegistry()316 builtinMetrics := metrics.RegisterBuiltinMetrics(registry)317 r2, err := NewFromArchive(318 &lib.RuntimeState{319 Logger: testutils.NewLogger(t),320 BuiltinMetrics: builtinMetrics,321 Registry: registry,322 }, arc)323 require.NoError(t, err)324 runners := map[string]*Runner{"Source": r1, "Archive": r2}325 for name, r := range runners {326 r := r327 t.Run(name, func(t *testing.T) {328 t.Parallel()329 ch := newDevNullSampleChannel()330 defer close(ch)331 initVU, err := r.NewVU(1, 1, ch)332 require.NoError(t, err)333 ctx, cancel := context.WithCancel(context.Background())334 defer cancel()335 vu := initVU.Activate(&lib.VUActivationParams{RunContext: ctx})336 err = vu.RunOnce()337 require.NoError(t, err)338 })339 }340}341func TestLoadCycleBinding(t *testing.T) {342 t.Parallel()343 // This is mostly the example from344 // http://2ality.com/2015/07/es6-module-exports.html#why-export-bindings345 fs := afero.NewMemMapFs()346 require.NoError(t, afero.WriteFile(fs, "/a.js", []byte(`347 import {bar} from './b.js';348 export function foo(a) {349 if (a !== undefined) {350 return "foo" + a;351 }352 return "foo" + bar(3);353 }354 `), os.ModePerm))355 require.NoError(t, afero.WriteFile(fs, "/b.js", []byte(`356 import {foo} from './a.js';357 export function bar(a) {358 if (a !== undefined) {359 return "bar" + a;360 }361 return "bar" + foo(5);362 }363 `), os.ModePerm))364 r1, err := getSimpleRunner(t, "/main.js", `365 import {foo} from './a.js';366 import {bar} from './b.js';367 export default function() {368 let fooMessage = foo();369 if (fooMessage != "foobar3") {370 throw new Error("Wrong value of foo() "+ fooMessage);371 }372 let barMessage = bar();373 if (barMessage != "barfoo5") {374 throw new Error("Wrong value of bar() "+ barMessage);375 }376 }377 `, fs, lib.RuntimeOptions{CompatibilityMode: null.StringFrom("extended")})378 require.NoError(t, err)379 arc := r1.MakeArchive()380 registry := metrics.NewRegistry()381 builtinMetrics := metrics.RegisterBuiltinMetrics(registry)382 r2, err := NewFromArchive(383 &lib.RuntimeState{384 Logger: testutils.NewLogger(t),385 BuiltinMetrics: builtinMetrics,386 Registry: registry,387 }, arc)388 require.NoError(t, err)389 runners := map[string]*Runner{"Source": r1, "Archive": r2}390 for name, r := range runners {391 r := r392 t.Run(name, func(t *testing.T) {393 t.Parallel()394 ch := newDevNullSampleChannel()395 defer close(ch)396 initVU, err := r.NewVU(1, 1, ch)397 require.NoError(t, err)398 ctx, cancel := context.WithCancel(context.Background())399 defer cancel()400 vu := initVU.Activate(&lib.VUActivationParams{RunContext: ctx})401 err = vu.RunOnce()402 require.NoError(t, err)403 })404 }405}406func TestBrowserified(t *testing.T) {407 t.Parallel()408 fs := afero.NewMemMapFs()409 //nolint: lll410 require.NoError(t, afero.WriteFile(fs, "/browserified.js", []byte(`411 (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.npmlibs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){412 module.exports.A = function () {413 return "a";414 }415 },{}],2:[function(require,module,exports){416 exports.B = function() {417 return "b";418 }419 },{}],3:[function(require,module,exports){420 exports.alpha = require('./a.js');421 exports.bravo = require('./b.js');422 },{"./a.js":1,"./b.js":2}]},{},[3])(3)423 });424 `), os.ModePerm))425 r1, err := getSimpleRunner(t, "/script.js", `426 import {alpha, bravo } from "./browserified.js";427 export default function(data) {428 if (alpha.A === undefined) {429 throw new Error("alpha.A is undefined");430 }431 if (alpha.A() != "a") {432 throw new Error("alpha.A() != 'a' (" + alpha.A() + ") != 'a'");433 }434 if (bravo.B === undefined) {435 throw new Error("bravo.B is undefined");436 }437 if (bravo.B() != "b") {438 throw new Error("bravo.B() != 'b' (" + bravo.B() + ") != 'b'");439 }440 }441 `, fs, lib.RuntimeOptions{CompatibilityMode: null.StringFrom("extended")})442 require.NoError(t, err)443 arc := r1.MakeArchive()444 registry := metrics.NewRegistry()445 builtinMetrics := metrics.RegisterBuiltinMetrics(registry)446 r2, err := NewFromArchive(447 &lib.RuntimeState{448 Logger: testutils.NewLogger(t),449 BuiltinMetrics: builtinMetrics,450 Registry: registry,451 }, arc)452 require.NoError(t, err)453 runners := map[string]*Runner{"Source": r1, "Archive": r2}454 for name, r := range runners {455 r := r456 t.Run(name, func(t *testing.T) {457 t.Parallel()458 ch := make(chan metrics.SampleContainer, 100)459 defer close(ch)460 initVU, err := r.NewVU(1, 1, ch)461 require.NoError(t, err)462 ctx, cancel := context.WithCancel(context.Background())463 defer cancel()464 vu := initVU.Activate(&lib.VUActivationParams{RunContext: ctx})465 err = vu.RunOnce()466 require.NoError(t, err)467 })468 }469}470func TestLoadingUnexistingModuleDoesntPanic(t *testing.T) {471 t.Parallel()472 fs := afero.NewMemMapFs()473 data := `var b;474 try {475 b = eval("require('buffer')");476 } catch (err) {477 b = "correct";478 }479 exports.default = function() {480 if (b != "correct") {481 throw new Error("wrong b "+ JSON.stringify(b));482 }483 }`484 require.NoError(t, afero.WriteFile(fs, "/script.js", []byte(data), 0o644))485 r1, err := getSimpleRunner(t, "/script.js", data, fs)486 require.NoError(t, err)487 arc := r1.MakeArchive()488 buf := &bytes.Buffer{}489 require.NoError(t, arc.Write(buf))490 arc, err = lib.ReadArchive(buf)491 require.NoError(t, err)492 registry := metrics.NewRegistry()493 builtinMetrics := metrics.RegisterBuiltinMetrics(registry)494 r2, err := NewFromArchive(495 &lib.RuntimeState{496 Logger: testutils.NewLogger(t),497 BuiltinMetrics: builtinMetrics,498 Registry: registry,499 }, arc)500 require.NoError(t, err)501 runners := map[string]*Runner{"Source": r1, "Archive": r2}502 for name, r := range runners {503 r := r504 t.Run(name, func(t *testing.T) {505 t.Parallel()506 ch := newDevNullSampleChannel()507 defer close(ch)508 initVU, err := r.NewVU(1, 1, ch)509 require.NoError(t, err)510 ctx, cancel := context.WithCancel(context.Background())511 defer cancel()512 vu := initVU.Activate(&lib.VUActivationParams{RunContext: ctx})513 err = vu.RunOnce()514 require.NoError(t, err)515 })516 }517}518func TestLoadingSourceMapsDoesntErrorOut(t *testing.T) {519 t.Parallel()520 fs := afero.NewMemMapFs()521 data := `exports.default = function() {}522//# sourceMappingURL=test.min.js.map`523 require.NoError(t, afero.WriteFile(fs, "/script.js", []byte(data), 0o644))524 r1, err := getSimpleRunner(t, "/script.js", data, fs)525 require.NoError(t, err)526 arc := r1.MakeArchive()527 buf := &bytes.Buffer{}528 require.NoError(t, arc.Write(buf))529 arc, err = lib.ReadArchive(buf)530 require.NoError(t, err)531 registry := metrics.NewRegistry()532 builtinMetrics := metrics.RegisterBuiltinMetrics(registry)533 r2, err := NewFromArchive(534 &lib.RuntimeState{535 Logger: testutils.NewLogger(t),536 BuiltinMetrics: builtinMetrics,537 Registry: registry,538 }, arc)539 require.NoError(t, err)540 runners := map[string]*Runner{"Source": r1, "Archive": r2}541 for name, r := range runners {542 r := r543 t.Run(name, func(t *testing.T) {544 t.Parallel()545 ch := newDevNullSampleChannel()546 defer close(ch)...
RegisterBuiltinMetrics
Using AI Code Generation
1import (2func main() {3 promauto.NewGaugeFunc(prometheus.GaugeOpts{4 }, func() float64 {5 })6 prometheus.RegisterBuiltinMetrics()7 http.Handle("/metrics", promhttp.Handler())8 log.Fatal(http.ListenAndServe(":8080", nil))9}10go_gc_duration_seconds{quantile="0"} 3.3e-0511go_gc_duration_seconds{quantile="0.25"} 3.8e-0512go_gc_duration_seconds{quantile="0.5"} 5.5e-0513go_gc_duration_seconds{quantile="0.75"} 0.000101214go_gc_duration_seconds{quantile="1"} 0.000105515go_info{version="go1.15.6"} 1
RegisterBuiltinMetrics
Using AI Code Generation
1import (2func main() {3 fmt.Println("Hello, playground")4 prometheus.RegisterBuiltinMetrics()5 http.Handle("/metrics", promhttp.Handler())6 http.ListenAndServe(":8080", nil)7}8go_gc_duration_seconds{quantile="0"} 09go_gc_duration_seconds{quantile="0.25"} 010go_gc_duration_seconds{quantile="0.5"} 011go_gc_duration_seconds{quantile="0.75"} 012go_gc_duration_seconds{quantile="1"} 013go_info{version="go1.13.6"} 1
RegisterBuiltinMetrics
Using AI Code Generation
1import (2func main() {3 fmt.Println("Starting the application...")4 prometheus.Register(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}))5 prometheus.Register(prometheus.NewGoCollector())6 http.Handle("/metrics", promhttp.Handler())7 log.Fatal(http.ListenAndServe(":8080", nil))8}
RegisterBuiltinMetrics
Using AI Code Generation
1import (2func main() {3 prometheus.Register(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}))4 prometheus.Register(prometheus.NewGoCollector())5 promauto.NewCounter(prometheus.CounterOpts{6 }).Inc()7 promauto.NewCounter(prometheus.CounterOpts{8 }).Inc()9 promauto.NewCounter(prometheus.CounterOpts{10 }).Inc()11 promauto.NewCounter(prometheus.CounterOpts{12 }).Inc()13 promauto.NewCounter(prometheus.CounterOpts{14 }).Inc()15 promauto.NewCounter(prometheus.CounterOpts{16 }).Inc()17 promauto.NewCounter(prometheus.CounterOpts{18 }).Inc()19 promauto.NewCounter(prometheus.CounterOpts{20 }).Inc()21 http.Handle("/metrics", promhttp.Handler())22 fmt.Println("Starting Server at Port 8080")23 log.Fatal(http.ListenAndServe(":8080", nil))24}
RegisterBuiltinMetrics
Using AI Code Generation
1import (2func main() {3 prometheus.RegisterBuiltinMetrics()4 http.Handle("/metrics", promhttp.Handler())5 http.ListenAndServe(":8080", nil)6}7import (8func main() {9 counter := prometheus.NewCounter(prometheus.CounterOpts{10 })11 prometheus.Register(counter)12 http.Handle("/metrics", promhttp.Handler())13 http.ListenAndServe(":8080", nil)14}15import (16func main() {17 counter := prometheus.NewCounter(prometheus.CounterOpts{18 })19 prometheus.Register(counter)20 prometheus.Unregister(counter)21 http.Handle("/metrics", promhttp.Handler())22 http.ListenAndServe(":8080", nil)23}24import (25func main() {26 counter := prometheus.NewCounter(prometheus.CounterOpts{27 })28 prometheus.Register(counter)29 prometheus.DefaultGatherer.Gather()30 http.Handle("/metrics", promhttp.Handler())31 http.ListenAndServe(":8080", nil)32}
RegisterBuiltinMetrics
Using AI Code Generation
1import (2func main() {3 metrics.RegisterBuiltinMetrics()4 r := mux.NewRouter()5 web.Init(r)6 http.Handle("/", r)7 log.Fatal(http.ListenAndServe(":8080", nil))8}9import (10func main() {11 metrics.RegisterBuiltinMetrics()12 r := mux.NewRouter()13 web.Init(r)14 http.Handle("/", r)15 log.Fatal(http.ListenAndServe(":8080", nil))16}17import (18func main() {19 metrics.RegisterBuiltinMetrics()20 r := mux.NewRouter()21 web.Init(r)22 http.Handle("/", r)23 log.Fatal(http.ListenAndServe(":8080", nil))24}
RegisterBuiltinMetrics
Using AI Code Generation
1{"level":"info","ts":1566319434.732097,"caller":"metrics/metrics.go:109","msg":"Metrics Service started","config":{"configMapName":"metrics-config","configMapNamespace":"default"}}2{"level":"info","ts":1566319434.732184,"caller":"metrics/metrics.go:115","msg":"Metrics Service started","config":{"configMapName":"metrics-config","configMapNamespace":"default"}}3{"level":"info","ts":1566319434.732198,"caller":"metrics/metrics.go:121","msg":"Metrics Service started","config":{"configMapName":"metrics-config","configMapNamespace":"default"}}4import (5var (6 counter = promauto.NewCounter(prometheus.CounterOpts{7 })8func main() {9 logger, err := zap.NewDevelopment()10 if err != nil {11 log.Fatalf("failed to initialize zap logger: %v
RegisterBuiltinMetrics
Using AI Code Generation
1import (2func main() {3 r := prometheus.NewRegistry()4 r.MustRegister(5 promauto.NewCounter(prometheus.CounterOpts{6 }),7 promauto.NewGauge(prometheus.GaugeOpts{8 }),9 promauto.NewHistogram(prometheus.HistogramOpts{10 Buckets: []float64{0.05, 0.1, 0.2, 0.5, 1, 2},11 }),12 r.MustRegister(prometheus.NewGoCollector())13 r.MustRegister(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}))14 http.Handle("/metrics", promhttp.HandlerFor(r, promhttp.HandlerOpts{}))15}16import (17func main() {18 r := prometheus.NewRegistry()19 r.MustRegister(20 promauto.NewCounter(prometheus.CounterOpts{21 }),22 promauto.NewGauge(prometheus.GaugeOpts{23 }),24 promauto.NewHistogram(prometheus.HistogramOpts{
RegisterBuiltinMetrics
Using AI Code Generation
1import (2func init() {3 prometheus.MustRegister(counters["my_counter"])4 prometheus.MustRegister(gauges["my_gauge"])5 prometheus.MustRegister(histograms["my_histogram"])6}7import (8func init() {9 prometheus.MustRegister(counters["my_counter"])10 prometheus.MustRegister(gauges["my_gauge"])11 prometheus.MustRegister(histograms["my_histogram"])12}13import (14func init() {15 prometheus.MustRegister(counters["my_counter"])16 prometheus.MustRegister(gauges["my_gauge"])17 prometheus.MustRegister(histograms["my_histogram"])18}19import (20func init() {21 prometheus.MustRegister(counters["my_counter"])22 prometheus.MustRegister(gauges["my_gauge"])23 prometheus.MustRegister(histograms["my_histogram"])24}25import (26func init() {27 prometheus.MustRegister(counters["my_counter"])28 prometheus.MustRegister(gauges["my_gauge"])29 prometheus.MustRegister(histograms["my_histogram"])30}
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!