To run UI based functional test cases using vso CICD - continuous-deployment

We have our web application, we created a automatic build for it on code checkin from visual studio and in Release definition we are deploying it to the remote iis server. Its getting deployed successfully. Now, we have coded UI test cases to run for testing the hosted application. Can anyone please help me that how we can run UI based functional test cases using VSO CD.
In Release definition, we added "Visual Studio Test Agent Deployment" but getting error
Invalid URI: The hostname could not be parsed.

Change the version of Deploy test agent task to 2.* and specify the FQDN (the same as Run functional Test)

Related

Unit test on local SQL Server not possible due to login fail

I am trying to run unit tests in Visual Studio on a local database. The unit test project was created by another user locally on his PC and runs there successfully. I cloned his project on my machine, created the database with the same publish profile as him but when I run the tests it fails with the error:
System.Data.SqlClient.SqlException: Login failed for user 'sa'..
I made sure that the unit test project in VS can access on the database by configuring the SQL Server Test Configuration. It means it should have access to my database. For both databases we use the same user name and the same password.

SQL Project in VSTS Continuous Integration via WinRM

Here is my solution.
I have a DB project in it, which multiple publish profiles. When I run publish from Visual Studio Manually by loading any profile it works perfectly.
We have our IIS in Azure VM and SQL in another Azure VM
We have a Continuous builds setup on Visual Studio Team Services, which will deploy site to Azure VM.
To the same build definition, I added a WinRm - SQL Server DB Deployment
Here is my Buil defination for dacpac step
When I run my build I get the following error
Microsoft.PowerShell.Commands.WriteErrorException: Deployment on one
or more machines failed. System.Exception: Invalid Publish Profile [
xxxxxxx ] provided
I don't really find any references on how to give profile information and why is it failing. Any help would be greatly appreciated.
Update
In order to resolve this as per #Jason Ye - MSFT suggestion, I copied my publish profile to Azure SQL VM and copied its full path and updated the profile path in build definition.
Then I got stuck with the following issue
Microsoft.PowerShell.Commands.WriteErrorException: Deployment on one
or more machines failed. System.Exception: Publishing to database
'DbName' on server 'xxxxxx.eastus.cloudapp.azure.com'. * Could
not load package from '/*.dacpac'. Illegal characters in path.
Since dacpac will keep changing, I cannot copy it to server before. How to get the path.

How to deploy database on linux

I have a small asp.net core website that I push to my server via jenkins. Jenkins does git checkout and then dotnet restore and dotnet run. It works for the website, but I added entity framework and I'm a little confused. How exactly do I move my local database to the server? Or should I create one on the server and then reference it?
I have one mssql database on (localdb)\MSSQLLocalDB, but when I run the server and try to go to a page which gets data from the database I get 500 Internal Server Error.
I would like to have one local db for testing and one on the server, but I just can't wrap my head around all of this.
Well in development, you should write a init script for your database. This will create all the required stuff your application needs.
So in linux...
Install the MySQL, get the users set up, and init the database.
In your application...
Provide the connection string for the DB installed in Linux.
I am not running my app in c# but this is similar to my node app. That is what I do. I develop in windows with Postgres. Then my prod is on a GoDaddy Linux cloud server and I have Postgres installed in that. When I do my git pull for the latest, I don't have to change much because of the .env file for my environment variables.

Eclipse configured tomcat doesn't delete server restart changes

I have a spring based maven web project on eclipse 3.6 and a locally configured tomcat 6 with it. When I make changes in any java source file or any configuration file it doesn't ask me to restart the server when I look at the tomcat instance.
Earlier for any server side changes it used to show a sign Restart at the tomcat server. Now I have to clean the project every time before a server restart to make the changes take effect.
So this[Started/Republish] is what it shows after making server side changes while this[Started/Restart] is how it should be. But [Started/Restart] doesn't happen automatically and I have to clean the project everytime for it.
Help needed.
Thanks.
EDIT: This is the tomcat configuration I have. I also have Build Automatically checked on the Project.
Make enable class file of the file in which you make change for tomcat server. More explanation is required on question ,i guess.

Migrating dotnetnuke from development to test server

I am a newbie with DotNetNuke and have been stumbling on how to deploy from the development server to the deployment server. For starters my development and deployment servers are one and the same machine. Here are the steps that I did:
DNN Setup
Downloaded DNN using WebMatrix.
Launched DNN and proceeded with the installation wizard, which is basically just testing the environment and then creating the DNN database.
After the wizard's installation launching DNN will now proceed to the Getting Started page
Added "localhost/dnn" in the site alias list
Moving to ISS
In IIS I added application (folder) DNN in the web root
I copied all the files from the original webmatrix path to the dnn folder in c:\inetpub\webroot making sure that the file/folder hierarchies are the same
Result:
When launching DNN using my browser I am directed to the installation wizard page instead of the Getting Started page. What am I missing?
Thanks!
Confirm that the permissions on the folder containing DNN are the same on your test server as they are on your development server. (I give Network Service read/write and IUsr Read/Execute)
Confirm that the application pool running your application has the proper identity (Network Service is suggested) and is running the proper .NET Framework version; based upon your question, I think you are set on this.
Gain access to your web.config file. You will see a ConnectionStrings section. You probably need to update the connection strings.
If your test server runs off of a different database than your dev server, figure out the connection string of your test server and update your connection string accordingly
You may be able to restore a .BAK file of your DB to your test server
If you do this, you will probably need to (in SSMS) edit your Portal Alias table to include the host name that you are using in your test server environment. Examples: Maybe you access the site via localhost/ on your dev environment, but you access to test site via test.Ronald.com? test.Ronald.com would be your PortalAlias
If your test server runs off the same database server as your dev server, it sounds like you need to open up access in firewalls so that your test server has connectivity to your dev database
A word of advice
Once you get it running, you will be making changes to each database separately (assuming your test site and dev site use different DB Servers). This sync issue can be a royal pain with DNN, as your page structures, module assignments, html module contents, installed modules/extensions will get out of sync. While restoring backups is nice, it is not a very good long-term solution. I recommend database-syncing tools
The problem is most likely a problem with DNN not being able to find the Database. If it can't find the database, it will run the wizard in order to create one.

Resources