
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@applitools/eyes-testcafe
Advanced tools
Install Eyes-Testcafe as a local dev dependency in your tested project:
npm i -D @applitools/eyes-testcafe@beta
In order to authenticate via the Applitools server, you need to supply the Eyes-Testcafe SDK with the API key you got from Applitools. Read more about how to obtain the API key here.
To to this, set the environment variable APPLITOOLS_API_KEY
to the API key before running your tests.
For example, on Linux/Mac:
export APPLITOOLS_API_KEY=<your_key>
npx testcafe chrome:headless some-test-dir
And on Windows:
set APPLITOOLS_API_KEY=<your_key>
npx testcafe chrome:headless some-test-dir
After defining the API key, you will be able to use commands from Eyes-Testcafe in your testcafe tests to take screenshots and use Applitools Eyes to manage them:
import {Eyes, Target} from '@applitools/eyes-testcafe';
const eyes = new Eyes();
fixture`Hello world`
.page('https://applitools.com/helloworld')
.afterEach(() => eyes.close());
test('Hello world page', async t => {
await eyes.open(t, 'Hello World!', 'My first JavaScript test!', {width: 1200, height: 800});
await eyes.check('Main Page', Target.window());
await t.click('button')
await eyes.check('Click!', Target.window());
});
Create an Applitools test. This will start a session with the Applitools server.
eyes.open(t, appName, testName, viewportSize)
Generate a screenshot of the current page and add it to the Applitools Test.
eyes.check(tag, checkSettings)
eyes.check
tag
Defines a name for the checkpoint in the Eyes Test Manager. The name may be any string and serves to identify the step to the user in the Test manager. You may change the tag value without impacting testing in any way since Eyes does not use the tag to identify the baseline step that corresponds to the checkpoint - Eyes matches steps based on their content and position in the sequences of images of the test. See How Eyes compares checkpoints and baseline images for details.
checkSettings
Holds the checkpoint's configuration. This is defined using the fluent API, starting with Target
.
Target.window()
.Target.window().fully()
.Close the applitools test and check that all screenshots are valid.
It is important to call this at the end of each test, symmetrically to open
(or in afterEach()
, see Best practice for using the SDK).
const testResults = await eyes.close(throwEx);
Every call to eyes.open
and eyes.close
defines a test in Applitools Eyes, and all the calls to eyes.check
between them are called "steps". In order to get a test structure in Applitools that corresponds to the test structure in Testcafe, it's best to open/close tests in every test
call. You can use afterEach
for calling eyes.close()
fixture`Hello world`
.page('https://applitools.com/helloworld')
.afterEach(async () => eyes.close());
FAQs
Applitools Eyes SDK for TestCafe
The npm package @applitools/eyes-testcafe receives a total of 13,958 weekly downloads. As such, @applitools/eyes-testcafe popularity was classified as popular.
We found that @applitools/eyes-testcafe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.