I have an (in-house) code quality tool that produces results like this, when run from the shell:
fooer/quxxer_bulk_stuff.go:40:16: rhubarb rhubarb...
fooer/quxxer_load.go:22:16: rhubarb rhubarb...
fooer/quxxer_load.go:78:16: rhubarb rhubarb...
How do I configure Goland so that I can run the tool on demand (i.e. not a File Watcher) and have the results appear in a run window? Also, I want to be able to click on a line in the results and jump to the referenced file and line, so I can review/fix the problem.
(Goland version 2019.1, Build #GO-191.6183.86)
You can configure it as an external tool in Settings | External Tools. To get clickable results, define an output filter ($FILE_PATH$:$LINE$:$COLUMN$:.* should work for your case). See the documentation for more information.
Related
I'm running unit tests on my GetModelAsync() and CreateModelAsync() methods in VS17. I then run Assert.Equal checks on the model fields to ensure they match the expected values.
I want to be able to see the final state of my models, which will help me determine why a test is failing or allow me to manually check my models. I'm thinking something similar to tracking variables in the debugger would make sense, although I don't want to actually run the debugger.
Is there a way to do this?
You can write to the console in your tests and it will show up in Test Explorer. You may want to serialize complex objects to JSON first before doing this. For example:
Console.WriteLine(JsonConvert.SerializeObject(myObject));
Note, for Visual Studio's built in test runner, you have to go through a few steps to see the console output. In the Test Explorer window, click the name of your test, then in the results panel click the Output link, which will open a separate window to show the console output. It's all very unintuitive.
I'm using XUnit, and in both the Visual Studio Test Explorer window and the Resharper Unit Test runner window, I'm no longer seeing the "output" hyperlink that would show the contents of WriteLine commands.
Is there a setting in the IDE that I need to change?
This is a change in xunit2. It no longer captures output from Console.WriteLine, etc. This is because it now runs tests in parallel, in multiple threads, and there's no way of knowing what test the output comes from. It is still possible to capture output, but you need to use xunit's ITestOutputHelper in order to do so. See the xunit docs for more details.
I am able to finish the installation process successfully.
Currently I am trying to run the scripts from MTAF. I am following the process and procedures mentioned in the Installation and User guide. But at the moment, I am not able to run any of the automated scripts. I am getting different messages like - "No test cases executed" / "Perhaps an error occurred. See the output window". For your reference, I have attached the main screen prints for the configurations I am using.
It would be of much help if you can point me to some person or group wherein I can get some help/directions to proceed further.
Corresponding to your setting on the 2nd screen, you have to change it from runtests.bat to path of PhpUnit execution file (../pear/phpunit.bat)
Additionally, you need specify in 'Project properties' -> 'PhpUnit configuration' -> 'Use bootstrap' + 'Use XML Configuration' references to ../mtaf/bootstrap.php and ../mtaf/phpunit.xml respectively.
It will be enough to run tests.
When the build fails, I'd like to execute a program that shoots me in the head with this. I've written the program already - I just need it to run when I break the build.
CCTray has the option to make a sound or icon - but not to run a file. Any simple ideas? I'd rather this not be an all day project. :)
CCTray allows you to run commands. In CCTry, go to File | Settings and then click on the Exec tab.
If you run Outlook, you can set up a rule that runs an application whenever you receive an email saying the build is broken. Just follow the rules wizard and you will find it (in Ootlook 2007 it's on the 3rd page of the wizard, in the select action part).
Cradiator has functionality to monitor build servers and do stuff when a build breaks. It doesn't have code to run an executable but it would be a cinch to download the code, change it and get what you want. Here's what I think is the quickest path to getting this done:
Download the source for Cradiator
Edit the DiscJockey.cs class
Add 1 line of code that starts your program (line 34) eg:
Configure Cradiator to monitor your build server (ie edit app.config and add your url) and run
if (newlyBrokenBuilds.Any())
{ // Add a line of code to start your program here eg
Process.Start("C:\\myprogram.exe");
}
I have some C code for an ARM926 target. I am trying to debug it using "Arm Xtended Debugger" (AXD). The main() of this code, takes 14 command line arguments which are mentioned in the code warrior project settings at proper place and behavior of the code is as expected.
But when I try to use the same AXF (Arm eXecutable Format file) file and try to do source level debugging using the RVDEBUG by changing the settings of the Codewarrior project, and start debugging, then the argc value is 1. Then the behavior of the code is unexpected.
When I select RVDEBUG in code warrior settings I give the same options as I used during AXD debug session.
So my question is:
I am using the same AXD for both the debugging sessions(AXD and RVDEBUG), why are they behaving differently? They should behave the same.
I don't use CodeWarrior but I know AXD and RVD: I remember Code Warrior can invoke AXD with the suitable arguments for the image, and so on. I don't know if Code Warrior can invoke RVD as well. So I suppose you run RVD yourself, outside any Code Warrior menu, don't you?
Then you just have to add the arguments in the dedicated input box at the bottom of the Load Image menu.
If this still does not work, I suggest you have a look at the semihosting options (they're rather in the connections options of RVD than in Code Warrior's).
Good luck!