What's the tools for testing of Azure configuration created from ARM template? - testing

Of course, each resource should be tested in individual way. But maybe some tools exist which provide some framework and help to automate and to connect typical steps?
I mean:
Template validation - for example with ARM template test toolkit
Logs analysis after deployment (for errors, for example)
Testing typical Azure resources by their types
etc

We can check for template validation if we develop our ARM template in VSCode, as it will show us the architecture of our template design.
To check for errors, when you select Powershell as interpreter and execute your ARM template from .ps script. It will give us all the error and status about the execution.
So according to this, we can test by implementing in Azure portal and need to check the deployed infrastructure and executed output. Ideally, we can achieve these from VS Code.

Related

ASP.NET Core front-end developer workflow with VSCode and VS 2019

I haven't done any cshtml front-end development for a few years.
What's the current, generally accepted way for ASP.NET Core front-end developers to work across a range of tools on Windows?
By that, I mean a way to have the front-end JS build and the .NET project(s) also build and to work rapidly in the browser and code.
My thinking is.
We have much better command line story around dotnet today.
Some folk like VS Code.
Some folk prefer VS 2019, and some like either, depending.
We need to work on UI aspects sometimes.
But we also need to attach a debugger and debug the server logic sometimes.
The build server should have no problem, be simple, and rely mostly on build logic held in the repo.
Tooling, and kicking off the whole build and serve process should be understandable and familiar.
It should be pretty simple to get going after a team noob clones the repo.
My initial thought would be to setup NPM then use something like Gulp to kick off everything, including running dotnet run.
Then when running under the Visual Studio 2019 debugger, use the Task Runner Explorer to kick off the Gulp stuff but skip the dotnet run part.
(shame there doesn't seem to be a command line for start VS(Code or 2019) and attach debugger)
Now I'm expecting to get a "primarily opinion based" SO beating, but there are general trends and ideas that go into designing all these tools for how they can all play ball together and what the dev story looks like.
You've pretty much already described the process. However, I'll add a few things:
You don't need the dotnet run bit. Visual Studio and VS Code are both capable of debugging directly.
You can assign the gulp tasks to build tasks in Task Runner Explorer, so you really don't even then to think about running those directly. I'm not as sure on this aspect of VS Code, but I'm sure there's probably some extension to handle it, if it's not already built-in.
If you want true ease of development, the best thing you can do is use Docker. Just add a Dockerfile to each project that actually runs (i.e. not a class library) and set up the steps to build and run it there. In Visual Studio, you can right-click the project and choose Add > Docker Support, and it will actually generate a ready-made Dockerfile, though you may need to add a step or two to handle the client-side build steps. In any case, this then becomes truly click and run, with nothing to worry about. The story is even better when you use docker-compose, as then Visual Studio and VS Code can spin up your entire application stack all at once, including external dependencies such as a database, Redis instance, etc. If you haven't used Docker before, start now. It's absolutely revolutionary for development.
One note for CI/CD, as much as possible, you should add a YAML file to describe your CI/CD pipeline. Depending on the the actual provider you're using for build/release, there might be some differences, so consult the relevant documentation. (Azure DevOps, for example, doesn't currently support describing release pipelines in yaml, though you can still do your build that way.) In any case, this allows you to configure all this in code, and have it committed to source control.
You may consider the same for your infrastructure. Azure has ARM templates, AWS has CloudFormation, GCP has Deployment Manager. There's also third-party tools like Terraform or Ansible. All of these, in some form or fashion (usually JSON or YAML) allow you to define all the characteristics of the infrastructure you're going to deploy to and commit that to source control. This makes deployment and things like creating new environments as breeze.

How to setup Python/Jython in IBM BPM

I want to configure Python/Jython in IBM BPM, so that these files can directly executed from process app. How can I do that?
How to setup this entry in WebSphere Application Server?
Why do you need to install python or jython on IBM BPM , if you need it to make deploy using WAS command line , there're commands that not related to jython or python and can do the same.
I don't believe that IBM BPM Standard really handles this use case (although more details would help). It is possible it maybe part of the "Advanced" offering, but I'm not as familiar with the integration designer product.
IBM BPM Standard allows you to call java code directly either as LiveConnect (bad) or executing java code you place in JAR files in the server files of your Process App (good). I have seen this used to leverage the Java ability to call command line scripts in order to issue some of the WASAdmin scripts, but that has been the limit of the integration with jython that I have seen.
For details about creating Java connectors you can use this article - http://www.ibm.com/developerworks/bpm/bpmjournal/1206_olivieri/1206_olivieri.html. While it says 7.5.1 the approach works for TeamWorks 7 through IBM BPM 8.5.5
Can you give more details about the use case you are trying to meet with this technical approach?
You can call any system process api/command using java, java code can be called by using as jar libraries.
System process api/command can execute python or any other code.
IBM BPM > Jar libs > System (OS) Process API/Commands > Python
I haven't come across any such use case.

Continous- integration software for cmake project hosted on github

We are looking for a software to run our test cases automatically.
We want a software which will run on our server (or a commercial), which automatically gets the newest commit on github. Then compiles the commit of the project with CMake and run Ctest on our test cases. The results should then be visualized on a nice website.
I had a look at CDash, but as the documentation is so bad I did not even get it to get the latest commit from github.
So my questions are:
Is there a good tutorial to CDash? Except the bad wiki page.
What software is available for running tests on new commits to github, what are their advantages and drawbacks?
In answer to your second question, Jenkins is a robost and extensible continuous integration tool that can be integrated tightly with GitHub using a plug-in (or loosely using standard Git support). It also supports CMake via a plug-in. Whether it has disadvantages that will make it less useful for you depends on your organization and build process, but I've found it to be highly customizable to a wide variety of processes. I recommend taking a look at it.
There's also a third-party Ctest plugin available for Jenkins.
CDash works in pair with CTest. If you are already using CMake then it should be fairly easy to submit your testing results to CDash. I'd recommend reading the CTest documentation:
http://www.vtk.org/Wiki/CMake_Testing_With_CTest
You can either install your own CDash server or use Kitware's hosted server at my.cdash.org. You can test your server with a sample project available at:
http://www.cdash.org/cdash/resources/software.html

Specific examples of vSphere SDK for .NET

The vSphere SDK for .NET developers pdf has a sample that describes how to connect to Vcenter and perform operations such as power-off, reboot etc.
I need specific examples for changing VM configuration such as disk, memory, CPU etc as well as migration through Storage VMotion and cloning.
The vSphere PowerCLI admin guide has specific examples to the above using command line in Powershell but there are no corresponding examples in C#. Has anyone attempted these operations in C#?
The vSphere SDK for .NET comes with many samples for performing various operations.
The samples, however, need to be rebuilt using a supplied batch file(s).
Here's how it is done:
Navigate to the path: VMware-vSphere-WS-SDK-4.1.0-257238\SDK\samples\DotNet
Under this path, you will find various batch files, such as: Build2005.cmd and
Build2008.cmd
There's also a readme_dotnet.html, but it seems outdated.
Open a Visual Studio command line window.
Navigate to the samples\DotNet folder.
If you have installed VS in a non-default location, fix up the environment variable prior to beginning:
"set the environment variable VSINSTALLDIR to the directory containing the 2 directories "Common7" and "SDK"." Please remember to use quotes around directory names that have spaces in them.
Execute Build2005.cmd or Build2008.cmd (for VS2005/2008).
This will create a "cs" folder with all relevant samples (58 projects).
Hope this helps!
Lior
I've played with a number of VMWare API's and I've settled on VSphere SDK for .NET also. It's not perfect but it's the best I've found so far. As far as samples, since the PowerCLI cmdlets are just wrappers for the underlying .NET classes I tend to google for PowerCLI examples and then port that over to C#.
It seems strange that when I go to the website for code samples they simply don't have a category for this SDK. They only have samples for the SDK that's a bunch of .net class source files based on WSDL.

Any good command-line tools (for a build server) for validating websites?

My team creates a number of dynamic/data-driven websites. We use a CruiseControl.NET to download the code, create test data, run unit tests, and install each site into IIS for manual testing. However we haven't found a good tool (or tools) that can actually run through some simple tests of the websites, such as checking for broken links or invalid HTML.
Are there any good tools that we can incorporate into our build process to automate basic website testing? E.g. check for broken links, check for HTML/JavaScript/CSS coding errors, and so on? Load testing would be great too.
Looking for something totally generic; we don't need to write/record scripts for playback. Just something to cover the basics.
Thank you!
-James
For link checking you could always look at http://linkchecker.sourceforge.net/ if that isn't suitable they list other alternatives.
It also seems like it is an active project.
JSLint does javascript validation and there are two options for executing it via the commandline so that might be worth a look too http://www.jslint.com/