Thursday, July 27, 2017

Big O notation



Big O specifically describes the worst-case scenario, and can be used to describe the execution time required or the space used (e.g. in memory or on disk) by an algorithm

The rate of growth of time with respect to input. 

https://www.quora.com/What-are-some-easy-ways-to-understand-and-calculate-the-time-complexity-of-algorithms




Sunday, July 23, 2017

SOLID Principles and Design Patterns



http://www.dotnetcurry.com/tutorials/software-gardening

S
O
L
I
D

BDD : Behavior Driven Development



http://specflow.org/getting-started/

http://www.dotnetcurry.com/patterns-practices/1375/behavior-driven-development-bdd

http://specflow.org/documentation/Unit-Test-Providers/


Steps:

1. Open Visual Studio --> Tools --> Extension and Update
    Specflow

2. Create a Unit test Project
    Select project --> Nuget Manager
     Specflow
     install Specflow and NUnit

3.  App.Config , Add following
<specFlow>  
  <unitTestProvider name="MSTest"></unitTestProvider>
</specFlow>

4. Create new Item,
  Specflow. feature file
  Right Click on Feature file in Test Editor  --> Generate Steps

5. Build , Open test explore and select the test case
     Execute


Wednesday, July 19, 2017

Test data generator tools


http://www.mockaroo.com/

http://www.generatedata.com/

http://www.datanamic.com/datagenerator/index.html

http://wiki.c2.com/?TestDataGenerator

https://webresourcesdepot.com/test-sample-data-generators/

http://www.softwaretestingmagazine.com/tools/open-source-test-data-generators/

http://toolsfordatabases.com/test-data-generation-tools.html

https://www.quora.com/What-are-the-tools-used-for-test-data-generation




Thursday, July 13, 2017

Command prompt cmd.exe c#


MSIEXEC


Microsoft Windows Installer (Windows 7/2008).

https://ss64.com/nt/msiexec.html

**********************************************************************

https://stackoverflow.com/questions/17613216/how-to-pause-cmd-before-it-close

https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true

Specify the K parameter instead of C
From Microsoft documentation:
/c : Carries out the command specified by string and then stops.
/k : Carries out the command specified by string and continues.


proc.Arguments = "/K ""ipconfig" 


Example:

using System.Diagnostics;
 
namespace ConsoleApplication7
{
    class Program
    {
        static void Main(string[] args)
        {
            string cmd = @"xcopy C:\abc\1\1.txt C:\abc\2\";
            ExecuteCommand(cmd);
        }
 
 
        public static string ExecuteCommand(string command)
        {
 
            ProcessStartInfo procStartInfo = new ProcessStartInfo("cmd""/k " + command)
            {
                UseShellExecute = false,
                CreateNoWindow = false,
                WindowStyle = ProcessWindowStyle.Maximized
            };
 
            using (Process proc = new Process())
            {
                proc.StartInfo = procStartInfo;
                proc.Start();
 
                string output = proc.StandardOutput.ReadToEnd();
 
                if (string.IsNullOrEmpty(output))
                    output = proc.StandardError.ReadToEnd();
 
                return output;
            }
 
        }
    }
 
}

Thursday, July 6, 2017

Python & Java


Tools to Code:

Python online interpreter

https://realpython.com/blog/python/setting-up-sublime-text-3-for-full-stack-python-development/

https://sourceforge.net/projects/pyscripter/


Java file executing and JVM

.java file (source code file) is compiled in to bytecode(.class file). Bytecode is platform independent, it can you distributed to any OS.   

JVM is platform dependent, its depends on Operating system, Processor. JVM comes with different version for different operating system.

The .Class file will be converted into Machine code by Windows JVM or Linux JVM depends on operating system.  The machine code will be used by processor and the program will execute. 

JMeter Simple Controller

  Simple Controller is just a  container  for user request.