How to integrate TestNG class in bitbucket and SCTM?
In our project, automation code(testNG with maven framework) is maintained in Bitbucket(git). Test plans are created in SCTM. What are the steps required to run a particular testNG class by fetching the code from Bitbucket using SCTM and runnning on Execution servers?
Which Silk Central version do you use?
In Silk Central you can configure a Source Control integration pointing to your BitBucket repository using the "Git" Source Control profile-type in Silk Central.
Have you tried that?
I am using Silk Central 17.0. I found it. Thanks. There is a Source control integration option. My team has set it to UNC. Can you tell me what is the difference between UNC path and Working folder?
Also in the test, in TestNG properties, there are 2 options,TestClass and Classpath.
I have given the TestNG classname in Test Class.
What should i enter in Classpath? Should i enter a .jar? jar will take up more space. What is the best way?
Thanks in Advance.
In a "UNC" source control profile, the "UNC path:" and "Working folder:" fields mean the following:
- In the "UNC path:" field you have to specify the location where your test sources are located.
- In the "Working folder:" you have to specify the full path to which the Silk Central execution server should copy the source files. Important: The working folder must be a local path. For example, "C:\TempSources\".
So, as an example:
You have your test sources located in a UNC share called "test-sources" on a host called "host-name". S you can access your test-sources via the UNC path "\\host-name\test-sources". This UNC path will be set into the "UNC path:" field of your UNC source control.
Into the "Working folder:" field you specify a local path called "c:\temp\test-sources".
So if you run your tests on an execution server, the test-sources will be copied from the UNC path "\\host-name\test-sources" into the local working folder "c:\temp\test-sources" on the execution server host.
Concerning the "TestNG" tests, this is not a test-launch plugin that is shipped with SC 17.0 per default.
From where did you get that?
I assume it's very similar t configure like the "JUnit test" test-launch plugin. So if you check the Silk Central help-topic "Creating or Editing JUnit Tests", then you get a description what you have to specify into the Class path field:
Specify a valid Java Classpath to use on the execution server.
- We recommend to use a relative classpath. The relative classpath is then expanded to the full classpath on the execution server. By using a relative classpath, changes on the location of the source control profile do not require additional changes to the classpath.
- The relative classpath must point to the root node of the test container containing the JUnit test, for example JUnit_tests. The relative classpath on the execution server is then expanded to include the working folder of the source control profile, for example C:\temp, and the test file names, for example tests.jar. For example, if your tests are packaged in a jar file called tests.jar and additional jar files that are needed for the execution are stored in a sub folder lib, your classpath would be ./tests.jar;./lib/*.
- You can also use a fully qualified classpath. The fully qualified classpath must point to the archive or folder in which the test classes reside.
I am not sure if this can be used in the same way for the TestNG test-launch plugin, but i assume so.
I hope this helps a bit.