Cannot locate CTest configuration - cmake

I am trying to perform a coverage analysis of a project in which I use CMake+CTest. I have created a simple TestingScript.cmake that looks like:
set(CTEST_SOURCE_DIRECTORY .)
set(CTEST_BINARY_DIRECTORY build_coverage)
ctest_start(TestCoverage)
ctest_coverage(BUILD ${CTEST_BINARY_DIR})
and am trying to run it with:
doriad#david-desktop:~/build/Examples/Coverage$ ctest -S ~/src/Examples/Coverage/TestingScript.cmake
Cannot locate CTest configuration: in BuildDirectory: /home/doriad/build/Examples/Coverage/build_coverage/CTestConfig.cmake
Cannot locate CTest configuration: in SourceDirectory: /home/doriad/build/Examples/Coverage/CTestConfig.cmake
Cannot find any coverage files. Ignoring Coverage request.
What do I need to do to produce this CTestConfig.cmake file that it is looking for?

The file CTestConfig.cmake is usually generated by CDash. While logged in to CDash, select Settings > Project > Miscellaneous > Download CTestConfig. The file holds the configuration to submit the results to a dashboard server.
The default settings of the module are to submit the dashboard to Kitware's Public Dashboard, where you can register your project for free.
In order to submit to some other server, CTestConfig.cmake in the top level directory of your source, and set your own dashboard preferences. If you are using a CDash server, you can download a preconfigured file from the respective project page on that server (Settings / Project, tab Miscellaneous).
Source: https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Testing-With-CTest
Another problem is that you have no coverage files to submit since you skipped the build and test steps in your testing script.

Related

Timestamp mismatch in Jenkins console and Project report path

I've setup Selenium with Cucumber java project in Jenkins and this project is generating report through this plugin.
plugin = {"com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:" }
This plugin generating reports inside D:\ABC\ABC-Meta\output\reports 03012022_161621901\test-output\SparkReport\Index.html
I want to publish HTML reports in Jenkins by extracting reports from this folder.
For that I've used Build Timestamp plugin and usage of BUILD_TIMESTAMP variable.
Configuration Setup of BUILD_TIMESTAMP parameter in Jenkins
Now I'm using same parameter with HTML Publish report configuration
${WORKSPACE}\output\reports ${BUILD_TIMESTAMP}\test-output\SparkReport
but when this step is executed post automation execution, folder doesn't exist due to mismatch in the timestamp..
Jenkins Console Logs
Jenkins Console Logs Timestamp
Project Report Location
Project Report Location Timestamp
Any idea how could I fetch or process this Build_timestamp parameter so that I can publish HTML report in correct manner? How to use Regex so that it would capture correct value of reporting folder?

How configure Azure function project in Intellij/Pycharm run/debug configurations on mac

How to configure Azure function project in Intellij/Pycharm run/debug configurations on Mac because I've tried to set it by my own but it doesnt work.
I would like to replace shell command: func start with run config
The image below from Pycharm
UPDATE
I've added path to Azure-CLI and imported my app-settings
I'm trying to configure the run configs but it asks to select the module but there is no any module in dropdown (see pic)
UPDATE-UPDATE:
Here is what azure-tools-for-intellij team me answered:
They dont support pure python functions run yet
I think you shouldn't use row shell scrip with IntelliJ/PyCharm instead of this you should use Azure Toolkit for IntelliJ and run/debug your functions like in this guide.
Also when you install Azure Toolkit for IntelliJ you will have the opportunity to create run/debug configuration with predefined Azure Function ready template.
Just example:
I found the way to debug in Intellij Idea/PyCharm.
add these lines at the top of your file/module:
import pydevd_pycharm
pydevd_pycharm.settrace('127.0.0.1', port=9091, stdoutToServer=True, stderrToServer=True)
set Python Debug Server with host and port in Run/Debug Configs
run your azure functions as used to (func host start) and press debugging button.
The way I do it in PyCharm is to define a shell script configuration (Edit Configurations > Shell Script) and set:
Execute: Script set
Script text: func start
Working directory: should be to project directory where host.json etc. is located
Environment variables: leave empty
Execute in the terminal: checked
Run this configuration, which will start the test server in terminal. Then go to Run > Attach to Process... and select the process (usually it's the one without any path after the number).

Run a build with qa-report plugin enabled to see results here

I start a new job in jenkins ci configured as free-style. I add post-build action "qa-report" and "Publish JUnit test result report". But I dont get qa-report and test result trend chart. I dont have the prevelige to access master machine. Cases are worked restrictly on a node. I can access the node.
For qa-report, I get the information.
Run a build with qa-report plugin enabled to see results here
What should I do? Does free-style not enabled qa-report? Do I need to specify some files or paths which located on master? Is there something wrong with the edition of maven. I am using maven3X. What kind of path of the xml file should I input to get chart. Any idea and references would be appreciated.
Expected:
1 qa-report
2 test result chart

Run a project from jetty in intellij with run time info outputted to a file

I have the following scenario:
I run my application in development mode and use jetty as the web server.Maven is used to build the application. Is it possible to output the run time log to a file instead of in the IntelliJ environment ?That is instead of viewing the information in the window with the red arrow pointing towards it I want to display it in a file.
You have a Logs tab in Jetty Server running configuration where you can choose to save console output to a file.

Generation of Selenium reports using Hudson (now known as Jenkins) from JUnit XML format file

For Test Automation of web project we use Hudson, PHPUnit, and Selenium. The results of the build are stored in the JUnit XML format.
When I try to include generation of reports using the Hudson Publish JUnit test result report option, the build finishes with Failed status.
Below is my Hudson configuration to run the tests.
sudo -u apache phpunit - log-junit /var/lib/hudson/jobs/Work-stars-Tests/builds/${BUILD_ID}/ seleniumReports/seleniumTests.xml + path to test php files
Generation of reports is enabled through the Hudson configuration option «Publish JUnit test result report», where I specify the path to the folder with PHP tests.
The user we use to run Hudson has permission to write/read files in the folder with the reports. As for the path we've tried to specify both full and relative.
The error No test report files were found. Configuration error? is displayed in the console after the build.
How do we resolve this issue?
Found my own solution to this problem :)
In Hudson project configuration settings modified execute shell command to
> #!/bin/sh -x phpunit --log-junit ${WORKSPACE}/zf/tests/_tmp/reports/seleniumTests.xml
> ${WORKSPACE}/zf/tests/selenium/; sed
> -i '/<testsuite name=".*\/"/D;/^ <\/testsuite>$/D'
> ${WORKSPACE}/zf/tests/_tmp/reports/seleniumTests.xml
and set following path to Junit reports
**/zf/tests/_tmp/reports/*.xml
Problem is solved. Yahoo!