Skip to content

Instantly share code, notes, and snippets.

Avatar

Smirnov Viacheslav polarnik

View GitHub Profile
@polarnik
polarnik / check.groovy
Last active Oct 5, 2020
JMeter Script Engine Check compilable
View check.groovy
import java.util.*;
import javax.script.*;
ScriptEngineManager mgr = new ScriptEngineManager();
List<ScriptEngineFactory> factories = mgr.getEngineFactories();
String [] javaProps = ["java.runtime.name", "java.runtime.version",
"java.specification.name", "java.specification.vendor", "java.specification.version",
"java.vendor", "java.vendor.url", "java.version", "java.version.date", "java.vm.name"];
@polarnik
polarnik / Grafana-Table-Old-with-link.json
Last active Jun 17, 2020
Grafana-Table-Old-with-link.json
View Grafana-Table-Old-with-link.json
@polarnik
polarnik / README.md
Created May 19, 2020
Перехват net.tcp трафика для Microsoft Dynamics NAV 2018 с помощью CANAPE Network Testing Tool
View README.md

Настройка перенаправления портов

Посмотреть свой сетевой адрес

C:\Windows\system32>ipconfig | findstr "IPv4"
   IPv4 Address. . . . . . . . . . . : 10.0.2.15
   Autoconfiguration IPv4 Address. . : 169.254.188.161

Выберем адрес 10.0.2.15 для экспериментов. Настроим перенаправление с 10.0.2.15:7046 на 127.0.0.1:9046

@polarnik
polarnik / property.30.jmx
Last active Apr 30, 2020
JMeter: errorlevel=-1073741819 when start jmeter gui with too many -J agruments: Источник: https://t.me/qa_load/20875
View property.30.jmx
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.2.1">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
View BasicSimulation.scala
package qaload
import java.text.SimpleDateFormat
import java.util.Calendar
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
@polarnik
polarnik / CloseModel_IncrementConcurrentUsers.scala
Last active Apr 8, 2020
src/test/scala/io/qaload/gatling/reportExample/simulation/CloseModel_IncrementConcurrentUsers.scala
View CloseModel_IncrementConcurrentUsers.scala
package io.qaload.gatling.reportExample.simulation
import io.gatling.core.Predef.{constantConcurrentUsers, nothingFor, _}
import io.gatling.core.structure.ScenarioBuilder
import io.qaload.gatling.reportExample.process.SimpleScenario
import io.qaload.gatling.reportExample.setting.Protocol
import scala.concurrent.duration._
import io.gatling.core.Predef._
@polarnik
polarnik / Protocol.scala
Last active Mar 5, 2020
Gatling No Proxy, Option Proxy
View Protocol.scala
package io.qaload.gatling.reportExample.setting
import com.softwaremill.quicklens
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.http.protocol.{HttpProxy, Proxy}
import com.softwaremill.quicklens._
import io.gatling.http.client.proxy.ProxyServer
import scala.concurrent.duration._
View converter.sh
#!/bin/bash
cat /tmp/template.json | awk '{ if ($0 ~ ".*{uuid}.*") { N=N+1; pattern="\\1{uuidprefix}" sprintf("%05d", N) "\\2"; print gensub(/(.*){uuid}(.*)/, pattern, "g", $0) } else { print $0 } }' > /tmp/template.new.json
View schema.js
schema = {
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"licenceId": { "type": "string" },
"licenceNum": { "type": "string" },
@polarnik
polarnik / AmqpGatlingSimulation.scala
Last active Jun 9, 2019
AMQP Gatling Test (Gatling 3.1.2, Scala 2.12.8, com.rabbitmq:amqp-client:5.3.0)
View AmqpGatlingSimulation.scala
package simulations
import io.gatling.commons.validation.Validation
import io.gatling.core.Predef._
import io.gatling.core.action.{RequestAction}
import io.gatling.core.action.builder.ActionBuilder
import io.gatling.core.session.{Expression, Session}
import io.gatling.core.structure.ScenarioContext
import io.gatling.core.action.Action
You can’t perform that action at this time.