Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@apexdevtools/benchmarker
Advanced tools
A performance testing framework, which orchestrates, profiles and persists stats from test scenarios run on Salesforce Orgs.
Tests execute using different templates in a JavaScript testing framework (e.g. mocha, jest). Results are can be saved to a provided PostgresSQL database.
The TransactionTestTemplate
calls a function (FlowStep
, most often created by helpers) to execute some anonymous Apex code provided for the test. The Apex can come from a file or inline as a string. This Apex code can also collect Governor limit metrics which will be extracted at the end of the test. After all tests complete, data attributed to the template can be saved. For a sample execution, see test_system/basic.test.ts
. Other test templates include boilerplate for running async batch processes and form/page loading.
Available scripts:
npm run build
- Clean rebuild ready to pack or run.npm run compile
- Run typescript compile only.npm test
- Run unit tests.npm run test:only --
- Run tests with args passed to mocha.
npm run test:only -- 'path/to/test.ts' -f 'specific test case'
-f
to match cases.Running system tests requires a Salesforce Org and Docker. The instructions below assume you have installed Docker, Salesforce CLI and have a Dev Hub set up. To use another type of org, multiple environment variables need setting with credentials, see .env.example
and test_system/.env
.
Create a scratch org:
sf org create scratch -f test_system/config/scratch-org.json -a bench_testing
Start the docker database with docker compose up -d
. It is accessible by the host on port 5433, and via adminer control panel at localhost:8081
to review results.
(Run once) Init system test env file with npm run test:system:init
. Uncomment SFDX_USERNAME=
and update to SFDX_USERNAME=bench_testing
.
Finally, run tests:
npm run test:system
All the source code included uses a 3-clause BSD license, see LICENSE for details.
1.0.0
FAQs
Benchmarks performance of processes on Salesforce Orgs
The npm package @apexdevtools/benchmarker receives a total of 1 weekly downloads. As such, @apexdevtools/benchmarker popularity was classified as not popular.
We found that @apexdevtools/benchmarker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.