cancel
Showing results for 
Search instead for 
Did you mean: 

how can i test the code that i write in visual studio with test complete ?

Highlighted
Occasional Contributor

how can i test the code that i write in visual studio with test complete ?

I wrote some codes in Visual studio and i want to unit test in test complete that codes. How can ı unit test in test complete ?

 

My_cod

 

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

 

 

 

namespace ClassLibrary2

{

    public class Islem

    {

        public Islem() { }

        public Islem(int sayi1,int sayi2)

        {

            this.Sayi1 = sayi1;

            this.Sayi2 = sayi2;

        }

 

        public int Sayi1 { get; set; }

        public int Sayi2 { get; set; }

        public int Carp ()

        {

            return this.Sayi1 * this.Sayi2;

        }

        public int Bol()

        {

            return this.Sayi1 / this.Sayi2;

        }

 

    }

}

 

for example ı want to test Bol or Carp what should ı do?

3 REPLIES 3
Highlighted
Community Hero

Re: how can i test the code that i write in visual studio with test complete ?

Start here https://support.smartbear.com/testcomplete/docs/testing-approaches/unit-testing.html

 

 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Occasional Contributor

Re: how can i test the code that i write in visual studio with test complete ?

I did same steps this link https://support.smartbear.com/testcomplete/docs/testing-approaches/unit-testing.html and I continued this topic-TestComplete Unit Tests - .NET Applications- . when ı try this step( 5. n the Process text box, click the ellipsis button and select the process started by your application in the subsequent dialog.) I took this error 'Unable to find a process with the name "UnitTestingDemo". Dialog of process is empty. What can i do solve this problem?

Highlighted
Community Hero

Re: how can i test the code that i write in visual studio with test complete ?

The project provided in that sample is simply there for demonstration purposes... it includes, installed on your hard drive, an application called "UnitTestingDemo".  For your own application you need to follow the steps and process described in that link but replace processes, etc., with your application.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors