TestCafe tests pass but job randomly fails [error]Process completed with exit code 1 - testcafe

The scenario is very similar to this one https://github.com/DevExpress/testcafe/issues/6804
Scenario:
I'm running a set of tests using testcafe, in a folder, with concurrency 4:
UI clicks
UI navigation
File upload scenario
Assertions
The job runs in github actions, with self-runners (docker container with no limits set) in AWS, using a properly sized m5.2xlarge box.
All goes well, tests pass, but randomly the job fails with an elusive error:
2022-06-11T08:10:53.9599698Z 30 passed (4m 34s)
2022-06-11T08:10:54.2336015Z Error:
2022-06-11T08:10:56.2617307Z ##[error]Process completed with exit code 1.
testcafe version 1.17.1
node version 14.17.18
I've tested changing/resizing the EC2 runner but didn't help. There are no errors on infra side, just the exit code 1 w/ no other details.
Is anyone else having this issue or have any advice on troubleshooting it?

Related

How to resolve below error-ERROR: Child Process Error: Test runner sel (JUnitTester) has failed with retcode 1

When I ran the selenium script using Taurus and want to convert in JMX then got the error-
10:55:54 ERROR: Child Process Error: Test runner sel (JUnitTester) has failed with retcode 1
10:55:54 ERROR: JUnitTester STDERR:
May 02, 2022 10:55:50 AM com.blazemeter.taurus.junit.CustomRunner main
INFO: Starting: [C:\Users\sss\2022-05-02_10-55-36.435651\runner.properties]
Exception in thread "main" com.blazemeter.taurus.junit.exception.CustomRunnerException: Nothing to test
at com.blazemeter.taurus.junit.CustomRunner.main(CustomRunner.java:54)
How it resolved?
It means that Taurus JUnit Executor failed somewhere somehow, inspect logs in the Artifacts Directory and look for Java/JUnit-related errors there.
Most probably JUnit executor wasn't able to detect any test cases to run, it's impossible to tell for sure what is the root cause without seeing the full logs and your automation code.
Be aware that you can use another approach not involving Taurus, i.e.
Kick off BlazeMeter Proxy Recorder
Configure your tests to use the above recorder as the proxy
Run your tests from IDE or console
The BlazeMeter proxy recorder will capture the requests and convert them into .jmx file (you can also export it as "SmartJMX" with automatic detection and correlation of the dynamic parameters)

Getting logs/more information during start-build command execution

Jenkins pipeline is building Docker images. OpenShift plugin(s) are used for the same.
An example command:
openshift.selector(BUILD_CONFIG_NAME, "${appBcName}").startBuild("--from-dir=${artifactPath}", '--wait','--follow')
While this works smoothly most of the time, whenever this command fails due to some underlying platform issues, almost no information is seen in the Jenkins build job console:
[Pipeline] }
[start-build:buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd] ............................................................
[start-build:buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd] Uploading finished
[start-build:buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd] Error from server (BadRequest): unable to wait for build amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd-857 to run: timed out waiting for the condition
[Pipeline] }
ERROR: Error running start-build on at least one item: [buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd];
{err=, verb=start-build, cmd=oc --server=https://api.scp-west-zone02-z01.net:6443 --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt --namespace=sb-1166-amld5-car-service-se --token=XXXXX start-build buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd --from-dir=./build/libs --wait --follow -o=name , out=Uploading directory "build/libs" as binary input for the build ...
............................................................
Uploading finished
Error from server (BadRequest): unable to wait for build amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd-857 to run: timed out waiting for the condition
, status=1}
[Pipeline] // catchError
I need more verbosity, detailed error information. I checked the start-build command reference, and I thought --build-loglevel [0-5] might help here. When I used it, I got a warning that since I am using source type as 'Binary' in the BuildConfig, logging isn't supported(seriously???)
NOTE: the selector returned when -F/--follow is supplied to startBuild() will be inoperative for the various selector operations.
Consider removing those options from startBuild and using the logs() command to follow the build output.
[start-build:buildconfig/casc-docs-spacetime-ubi-openshift-java-runtimeadoptopenjdk] WARNING: Specifying --build-loglevel with binary builds is not supported.
[start-build:buildconfig/casc-docs-spacetime-ubi-openshift-java-runtimeadoptopenjdk] WARNING: Specifying environment variables with binary builds is not supported.
[start-build:buildconfig/casc-docs-spacetime-ubi-openshift-java-runtimeadoptopenjdk] Uploading directory "build/libs" as binary input for the build ...
[start-build:buildconfig/casc-docs-spacetime-ubi-openshift-java-runtimeadoptopenjdk] ..
How do I get more logs, info. while executing the start-build command?
I was facing the same problem, I just used something like:
def build = openshift.selector(BUILD_CONFIG_NAME, "${appBcName}").startBuild("--from-dir=${artifactPath}", '--wait','--follow')
build.logs('-f')
And so far it seems to work, I got the logs from my openshift build in my Jenkins pipeline. Now I'll try to get the logs only if build does not Complete, to reduce the overall logs.
(for future searchers like me ^^)

SSIS doesn't run windows scheduler task correctly

I am trying to run a Windows scheduler task using schtasks.exe in an SSIS job. The task will be called using the same ID as is used to execute the task. The task itself works; It is currently started manually after the SSIS job is done.
I've tried running a script on my own PC with a space in the name and this worked. All other settings are the same. The name of this task is "DWH Upload DEV" and it's location is set to "\".
I'm calling the script from an Execute Process Task block, using schtasks.exe as the executable (with the full file path of course) and /RUN /TN "DWH Upload DEV" as the arguments.
I have RequireFullFileName set to False, FailTaskIfReturnCodeIsNotSuccessValue set to True and SuccessValue and TimeOut to 0
I am receiving the following error: [Execute Process Task] Error: In Executing "[location]\schtasks.exe" "/RUN /TN "DWH Upload DEV"" at "", The process exit code was "1" while the expected was "0".
The part here that confuses me is the error being at seemingly nothing.
Thanks in advance for any help!
EDIT:
I can't run the program that is performed by the scheduler from SSIS itself, due to the program needing to be run by a specific user. The use of task scheduler is a workaround for this.
So, as it turned out, the task DID trigger but it didn't actually properly work (I later heard the task stopped working about an hour before I started working with it). The task can now properly be run by using the following settings:
Executable: C:\Windows\System32\schtasks.exe
Arguments: /RUN /TN "DWHUploadDEV" (the new version has no spaces in the name)
The rest of the settings is as normal.

Error: getaddrinfo ENOTFOUND api.appcenter.ms api.appcenter.ms:443 throws on uploading files to appcenter

I am working on sample tests for mobile application and to upload and run in AppCenter. I have tried with XamarinUITest and C# combination; test files uploaded and ran successfully. On trying test files with Appium, Java and Junit and tried to upload it in AppCenter throws Error: getaddrinfo ENOTFOUND api.appcenter.ms api.appcenter.ms:443 in Terminal.
The snippet I am using to upload is:
appcenter test run appium --app "Appium/JunitiOS" --devices "Appium/iphone" --app-path pathToFile.ipa --test-series "test" --locale "en_US" --build-dir target/upload
Note: given corresponding file paths in the snippet.
and get the below in Terminal:
Preparing tests... done.
Validating arguments... done.
Creating new test run... done.
Validating application file... done.
Uploading files... failed.
Error: getaddrinfo ENOTFOUND api.appcenter.ms api.appcenter.ms:443
Environment: darwin
App Upload Id: Appium/JunitiOS
Timestamp: 1554114371409
Operation: RunAppiumTestsCommand
Exit Code: 3
This error usually occurs when there's some sort of network issue (either WiFi dropping out, a corporate firewall or proxy or a DNS issue are likely culprits)
Things to try if the successful upload is running on a different machine or a different network
Check the failing upload over a different network
Make sure you can see the URLs and IPs from the machine you're running on
If that fails - reach out to support using the App Center portal and a support engineer will help you get up and running
Things to try if the successful upload is running on the same machine on the same network
Double check that the UITest tests are still working successfully
Check that you don't have any corporate firewall policies which could be blocking specific files
If that fails - reach out to support using the App Center portal and a support engineer will help you get up and running
I would also recommend running the command again using --debug - you should be able to see the API calls being sent and identify at which point the uploads are failing (and if it's the same point every time).

Unable to run job in any queue in Sun Grid Engine

I am running Sun Grid Engine and just finished installing it. I submit a job using a shell wrapper script from command line like
./hello_world_qsub.sh
but when I run it I get the following error
Unable to run job: b410 your job is not allowed to run in any queue . Your job 1("hello_world.sh") has been submitted.
Got the answer myself,
In the user configuration tab in qmon, add the name of your executing host and click modify that did the job