[Description("Converts the date in given parameters into todays age and saves with suffix as new parameter")]
publicclassConvertDateToAge:WebTestPlugin
{
[DisplayName("Parameter RegEx"),DefaultValue(""),Description("Regular expression. If the parameter exists in context and matches it will be convertet into a date. Will not fail the script if date cannot be converted.")]
publicstringParameterRegEx{get;set;}
[DisplayName("Date Format"),DefaultValue("yyyy-MM-dd"),Description("The format of the date string in the parameter to convert from, see https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings")]
publicstringDateFormat{get;set;}
[DisplayName("Age Parameter Suffix"),DefaultValue("_Age"),Description("The suffix to be added for new parameters. If set to null or empty the original parameter will be overwritten.")]
elsee.WebTest.AddCommentToResult("Failed to calculate age using \""+obj.Value.ToString()+"\" of parameter \""+obj.Key+"\""+" and format \""+DateFormat+"\"");
}
catch(Exceptionex)
{
e.WebTest.AddCommentToResult("Failed to convert date parameter to age: "+ex.Message);
}
}
}
// Add the new ones to the webtest context
foreach(KeyValuePair<string,object>objintemp)
{
e.WebTest.Context[obj.Key]=obj.Value;
e.WebTest.AddCommentToResult("Saved value \""+obj.Value+"\" into \""+obj.Key+"\"");
[Description("Reparses all cookies set by the server and stores the value in UrlEncoded format. Cookies with illegal characters will otherwise cause none of the previous set cookies to be added to new requests.")]
@@ -23,6 +23,39 @@ using System.Text.RegularExpressions;
namespaceLIL_VSTT_Plugins
{
/// <summary>
/// LoadTest Clear Temp
/// </summary>
[DisplayName("Clean Temp Files")]
[Description("(C) Copyright 2020 LIGHTS IN LINE AB\r\nCrashed loadtests can leave a lot of test logs in the temp folder of the agent. This plugin removes them before starting a new loadtest.")]
<LoadTestPlugin Classname="LIL_VSTT_Plugins.CleanTempFolder, LIL_VSTT_Plugins, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="Clean Temp Files" Description="(C) Copyright 2020 LIGHTS IN LINE AB
Crashed loadtests can leave a lot of test logs in the temp folder of the agent. This plugin removes them before starting a new loadtest." />
<WebTestPlugin Classname="LIL_VSTT_Plugins.ConvertDateToAge, LIL_VSTT_Plugins, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="Convert Date Parameter to Age" Description="Converts the date in given parameters into todays age and saves with suffix as new parameter">