@manhng

Welcome to my blog!

Kiểm trử phần mềm

July 18, 2018 21:48

Kiểm trử phần mềm (edit)

https://www.softwaretestinghelp.com/top-20-automation-testing-tools/

https://viblo.asia/p/performance-testing-va-mot-so-cong-cu-kiem-thu-performance-bWrZnLwm5xw

https://www.blazemeter.com/blog/open-source-load-testing-tools-which-one-should-you-use

There are mainly four testing levels are:

  1. Unit Testing
  2. Integration Testing
  3. System Testing
  4. Acceptance Testing

https://www.guru99.com/testing-tools.html

https://www.guru99.com/data-testing.html

Best C# Tools (link)

  • Fiddler
  • Postman
  • Advanced REST client
  • CodeMaid
  • Visual Studio jQuery Code Snippets
  • Refactoring Essentials
  • xUnit
    • FluentAssertions -version 4.2.1
    • xUnit -version 2.1.0
    • xUnit.Runner.Dnx -version 2.1.0
    • Microsoft.AspNetCore.TestHost
    • Microsoft.EntityFrameworkCore.InMemory
    • Microsoft.EntityFrameworkCore.Sqlite
    • EfCore.TestSupport
  • Cake Build
  • C# Pad (Online IDE for C#)
  • JDoodle (Online IDE for C#)
  • OzCode
  • LINQPad
  • Selenium
  • ReSharper
  • ANTS Performance Profiler
  • Jenkins

Test Coverage

https://www.guru99.com/test-coverage-in-software-testing.html

Cookie Testing

https://www.guru99.com/cookie-testing-tutorial-with-sample-test-cases.html

Cookie Testing Tutorial with Sample Test Cases

Globalization vs Localization Testing

https://www.guru99.com/globalization-vs-localization-testing.html

Globalization testing: toàn cầu hóa, cho bất kỳ culture hoặc local

Localization testing: địa phương hóa, cho một culture hoặc local xác định

Security Testing

https://www.guru99.com/what-is-security-testing.html

Performance Testing (WebLOAD Free Edition)

https://www.softwaretestinghelp.com/performance-testing-tools-load-testing-tools/

https://www.guru99.com/performance-testing.html

https://www.webpagetest.org/

  • Speed - Determines whether the application responds quickly
  • Scalability - Determines maximum user load the software application can handle.
  • Stability - Determines if the application is stable under varying loads

Selenium

Sahi

WatiN

QMetry

Grinder (free)

jMeter (free) (Video)

BlazeMeter (Web)

BugNet (GitHub)

BugNET is a free, open source issue tracking and project issue management solution for the ASP.NET platform.

Bug Genie

RedMine

Acunetix Vulnerability Scanner

W3C CSS validator

Test

October 5, 2017 11:31

Example of Console Application using HttpClient for Auth

using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

namespace ConsoleApp
{
internal class Program
{
private static void Main(string[] args)
{
var enterResult = "";
while (enterResult != "Exit")
{
Console.WriteLine("Choose an action: ");
Console.WriteLine("1. LogIn");
Console.WriteLine("2. Exit");
switch (Console.ReadLine())
{
case "1":
DoSomething();
break;

case "2":
enterResult = "Exit";
break;

default:
break;
}
}
}

private static void DoSomething()
{
const string userName = "someuser@someemail.com";
const string password = "Password1!";
const string apiBaseUri = "http://localhost:18342";
const string apiGetPeoplePath = "/api/people";

//Get the token
var token = GetApiToken(userName, password, apiBaseUri).Result;
Console.WriteLine("Token: {0}", token);

//Make the call
var response = GetRequest(token, apiBaseUri, apiGetPeoplePath).Result;
Console.WriteLine("response: {0}", response);
}

private static async Task<string> GetApiToken(string userName, string password, string apiBaseUri)
{
using (var client = new HttpClient())
{
//setup client
client.BaseAddress = new Uri(apiBaseUri);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

//setup login data
var formContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("grant_type", "password"),
new KeyValuePair<string, string>("username", userName),
new KeyValuePair<string, string>("password", password),
});

//send request
HttpResponseMessage responseMessage = await client.PostAsync("/Token", formContent);

//get access token from response body
var responseJson = await responseMessage.Content.ReadAsStringAsync();
var jObject = JObject.Parse(responseJson);
return jObject.GetValue("access_token").ToString();
}
}

public static async Task<string> GetRequest(string token, string apiBaseUri, string requestPath)
{
using (var client = new HttpClient())
{
//setup client
client.BaseAddress = new Uri(apiBaseUri);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

//make request
HttpResponseMessage response = await client.GetAsync(requestPath);
var responseString = await response.Content.ReadAsStringAsync();
return responseString;
}
}
}
}

Categories

Recent posts