When I run a cypress test in a gitlab CI occasionally I will see the following error from cypress-visual-regression plugin:
Snapshot /repo/cypress/snapshots/actual/filename-actual.png does not exist.
The stack trace is:
at /repo/node_modules/cypress-visual-regression/dist/utils.js:55:14 at new Promise (<anonymous>:null:null) at parseImage (/repo/node_modules/cypress-visual-regression/dist/utils.js:53:10) at compareSnapshotsPlugin (/repo/node_modules/cypress-visual-regression/dist/plugin.js:60:29) at runMicrotasks (<anonymous>:null:null) at processTicksAndRejections (internal/process/task_queues.js:97:5)
from my understanding the compareSnapshot command in the cvr plugin takes the image and then compares it to my base image, so the image should exist when the comparison occurs.
My first thought is one of asynchrony potentially trying to compare the image before it has been taken.
edit: for the most part it works fine, this is an intermittent failure which is what I find most galling.
Related
I am running some tests that are just grabbing inputs and filling them in with data and there are a lot.
I have multiple tests like the code below:
cy.get('input').eq(0)
.type('4')
.type('{selectall}')
.type('500000')
.type('{backspace}')
And, I keep getting this error:
Also the amount for that error keeps increasing very rapidly in the console!
Anyone know why this is happening in Cypress?
The goal is to draw a graph using D3 (v3) in a WebWorker (Rickshaw would be even better).
Requirement #1:
The storage space for the entire project should not exceed 1 MB.
Requirement #2:
Internet Explorer 10 should be supported
I already tried to pass the DOM element to Webworker.
This brought the following error message:
DOMException: Failed to execute 'postMessage' on 'Worker': HTMLDivElement object could not be cloned.
var worker = new Worker( 'worker.js' );
worker.postMessage( {
'chart' : document.querySelector('#chart').cloneNode(true)
} );
The GitHub user chrisahardie has made...
a small proof on concept showing how to generate a d3 SVG chart in a
web worker and pass it back to the main UI thread to be injected into
a webpage.
https://github.com/chrisahardie/d3-svg-chart-in-web-worker
He integrated jsdom into the browser with Browserify.
The problem:
The script has almost 5 MB, which is too much memory requirements for the application.
So my question:
Does anyone have experience in solving the problem or has any idea how the problem can be solved and the requirements can be met?
The Web Workers don't have access to the following JavaScript objects: The window object, The document object and The parent object. So, all we could do on that side would be to build something that could be used for quickly creating the DOM. The worker(s) could e.g process the datasets and do all the heavy computations, then pass the result back as a set of arrays. More details, you could check this article and this sample
Just wanna know if this scenario is possible in jmeter:
I will create a website using docker image then i will have to check the exact accessibility time(from creating up to launching/checking the site). Once the requirement is met, the timer will stop and it will give me the exact time on when it is actually up. Also, in the view result tree, i only want to get the last successful status. The View Result Tree will only show the last successful status and will disregard the failed status. This is the sample of my thread that i am using: enter image description here
If you really want to discard non-successful results you can do this using JSR223 Assertion and the following Groovy code:
if (!prev.isSuccessful()) {
prev.setIgnore()
}
where prev is a shorthand for parent SampleResult and setIgnore() function tells the listener to ignore the result in case of failure.
More information: Scripting JMeter Assertions in Groovy - A Tutorial
enter image description here
I have the following test in cypress:
cy.visit('/main.html')
cy.get('#homeTitle').contains('Welcome')
this passes.
If I change the contains value to "Welcome2" test should fail, and it fails in the runner, but the timer displayed continues to run, and it will not proceed to next test.
Seems like it doesn't time out or something.
Are you trying to test that the element with id #homeTitle should contain the text message 'welcome' ? If so try this:
cy.get('#homeTitle').should('contain','welcome');
I don't quite understand your issue, but I will look harder.
I created a private image of a Google compute engine persistent disk, called primecoin01.
Later on, I'm trying to create a new image. It fails by saying the regexp is invalid both in listing the images and during gcloud.compute.instances.delete - the 1st step in using my persistent disk to create an image. It let me create the image name and now I'm unable to use the commands gcloud compute images list or gcloud compute instances delete instance-0 --keep-disks boot. I do not know a way to delete this image from my list.
primecoin01 certainly meets the regular expression criteria, and I have no clue why it named the image apparently ``primecoin01 All help greatly appreciated.
Details below:
C:\Program Files\Google\Cloud SDK>gcloud compute images list
NAME PROJECT ALIAS DEPRECATED STATUS
centos-6-v20141021 centos-cloud centos-6 READY
centos-7-v20141021 centos-cloud centos-7 READY
coreos-alpha-494-0-0-v20141108 coreos-cloud READY
coreos-beta-444-5-0-v20141016 coreos-cloud READY
coreos-stable-444-5-0-v20141016 coreos-cloud coreos READY
backports-debian-7-wheezy-v20141021 debian-cloud debian-7-backports READY
debian-7-wheezy-v20141021 debian-cloud debian-7 READY
container-vm-v20141016 google-containers container-vm READY
opensuse-13-1-v20141102 opensuse-cloud opensuse-13 READY
rhel-6-v20141021 rhel-cloud rhel-6 READY
rhel-7-v20141021 rhel-cloud rhel-7 READY
sles-11-sp3-v20140930 suse-cloud sles-11 READY
sles-11-sp3-v20141105 suse-cloud sles-11 READY
sles-12-v20141023 suse-cloud READY
ERROR: (gcloud.compute.images.list) Some requests did not succeed:
- Invalid value '``primecoin01'. Values must match the following regular expression: '(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z]
(?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))'
and
C:\Program Files\Google\Cloud SDK>gcloud compute instances delete instance-0 --keep-disks boot
ERROR: (gcloud.compute.instances.delete) Unable to fetch a list of zones. Specifying [--zone] may fix this issue:
- Invalid value '``primecoin01'. Values must match the following regular expression: '(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z] (?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))'
and
C:\Program Files\Google\Cloud SDK>gcloud compute instances delete instance-0 --keep-disks boot --zone us-central1-b
The following instances will be deleted. Attached disks configured to
be auto-deleted will be deleted unless they are attached to any other
instances. Deleting a disk is irreversible and any data on the disk
will be lost.
- [instance-0] in [us-central1-b]
Do you want to continue (Y/n)? y
ERROR: (gcloud.compute.instances.delete) Failed to fetch some instances:
- Invalid value '``primecoin01'. Values must match the following regular expression: '(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z]
(?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))'
It seems to be a validation error when creating the disk and the name is not correct. Are you still having the same issue?
A way to create a 'snapshot' of your disk will be to use the dd Linux command to burn your image and then tar the file to create an image from this file.