I want test output to be logged incrementally when running tests via stack test, is there a way to enable this?
Related
I am running a Go test that I think should be cached when I run it more than once, however, Go is running the test every time.
Is there a flag or environment variable I can use to help determine why Go is deciding not to cache this particular test?
Set GODEBUG=gocachetest=1 in the environment, run the test twice and diff the output between test runs.
If that's not enough you can use GODEBUG=gocachehash=1 to determine the components of the cache hash.
Im using a test setup with BrowserMobProxy. I'm running my test on Browserstack so I have to start Browserstack local otherwise I can't use BrowserMobProxy.
The next step is to run my tests in parallel but is this possible because I'm using Browsertack local? I can't find a solution.
Yes, it is possible to run parallel tests with Browserstack local. You can run upto 100 parallel tests with only one instance Browserstack local without having any performance impact.
Incase, you want to scale even more, you can start another instance of Browserstack local with the flag : --local-identifier <unique_string> and pass the following capability browserstack.localIdentifier : <unique_string> in your test. This would ensure the traffic of that test would route through this binary instance with the local identifier. You can run multiple such instances by passing some unique strings.
i want to log each and every step of the process ex: sign up done, user dashboard opened , user profile edited. How can this be achieved by cypress. I tried this using node.js but as cypress runs in browser i cant create file using node.js and also i tried by cy.writefile where it replace the previous this i have written in the file. Is there a way to do this ???
After this i do want to send this log to an email.
Welcome to Stack Overflow. If you run Cypress on a CI Server like CircleCI, it can record your output.
There is also a --record option, where it saves the details of the session for you.
Cypress can record your tests running and make them available in our
Dashboard.
Recorded tests allow you to: See the number of failed, pending and
passing tests. Get the entire stack trace of failed tests. View
screenshots taken when tests fail and when using cy.screenshot().
Watch a video of your entire test run or a clip at the point of test
failure.
You can read more about recording sessions here https://docs.cypress.io/guides/guides/continuous-integration.html#Recording-tests-in-CI
My group will be implementing CI using Jenkins. As such, I want to make sure that any unit and/or integration tests we create integrate easily with Jenkins. We have several different technologies in our stack we are using from C++ code to Oracle PL/SQL packages to Groovy code. We want to develop test drivers (code that wraps and tests these individual code units) that we can integrate with Jenkins so that these tests are automatically run when we perform commits (git) as well as on a nightly basis. My question is, what are the best practices for writing these test drivers so that they will easily integrate with Jenkins when we implement it?
For example, we have have a PL/SQL stored procedure that we want to run tests against as part of our CI testing. I could write a bash shell script that wraps calls to it, I could write a Java program that calls it. Basically I could wrap it in anything. Then the next question is...is there some sort of standard for outputting results so that Jenkins can easily determine if the test passed or failed?
.is there some sort of standard for outputting results so that Jenkins
can easily determine if the test passed or failed?
If your test results are compliant with Junit results,jenkins have junit plugin which give you the better way for tracing test reports (result trend graph) and also test result archiving. converting ant test log to Junit format easier one.
useful links:
http://nose2.readthedocs.org/en/latest/plugins/junitxml.html
https://wiki.jenkins-ci.org/display/JENKINS/JUnit+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin
Jenkins and JUnit
Basically I could wrap it in anything.
I personally prefer to go with Java among your choices.because it give you better Api to create xml files
Use python unittest to wrap any of your tests.
Produce junit xml test results.
One easy way of getting any python unittest to write out junit is from command-line.
yum install pytest
And call your test script like this:
py.test --junitxml result.xml testscript.py
And in jenkins build configuration Post-build actions Add a "Publish JUnit test result report" action with result.xml and any more test result files you produce.
https://docs.python.org/2.7/library/unittest.html
This is just one way of producing junit xml results with python. There are a good few other methods either using unittest module or junitxml or others.
i want to call some function once before all test started, and i need to know which tests are going to run. For example, if i selected TestMethod1 and TestMethod3 in my test plan, and run those two testcases, i need to get the test method information of 'TestMethod1' and 'TestMethod3'.
Is there any way to do that??