How can I run test from silktest net by using a windows form - silktest

How can I run test from silktest net by using a windows form
I plan to create windows form application which allows user to select a script to run.
Example:
My app has a form windows with 2 buttons(Select & Start), when I click on button select I load the script to run and after that I click on button Start to run the selected script.
My question is how can I call [TestMethod] when clicking button Start.

I assume you have written your Silk Test test cases in .NET, so you should be able to load the resulting assembly and look for your test cases using reflection, for example as you mentioned using the [TestMethod] annotation.
Once you have found all the test cases, you can present them to the use, have him select one (or more) and when he presses Start you simply call the selected test case methods.

Related

Do we have any method to know whether the protractor script is currently running or not

I need to execute the protractor script automatically from windows task scheduler at particular time intervals. I can do that by giving command(protractor conf.js) in a batch file. But i need to check whether the protractor script is currently running or not. If it not in a running mode then only i need to execute the batch file. How can i do this? Can anyone help me.
Thanks in advance.
I can think of three options:
Run %windir%\system32\taskschd.msc /s, drill-down to your task entry, right-click and select properties from the drop-down menu. Select the settings tab and select Do not start a new instance in the drop-down selection box under If the task is already running, then the following rule applies:.
Add the <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> element to the <Settings> group in your task XML file and import that.
Set the MultipleInstancesPolicy setting via whatever script/code you're using to create the task. See ITaskSettings::put_MultipleInstances.

How to integrate Protractor test cases with Hiptest?

For a Website which is made using angular js , our organization used protractor as the tool to automate test cases.
Our organization has come up with a new tool named 'HipTest' to manage test cases automation.
How to integrate protractor test cases with HipTest. I went to following links but was unable to fetch some useful information.
https://docs.hiptest.net/automate-your-tests/
https://github.com/hiptest/hiptest-publisher
Can Anyone help me how to start ?
I'm one of the main contributor or hiptest-publisher, so I should be able to help you.
The quick way to start with hiptest-publisher is to download the bootstrap of the tests from Hiptest (under the automation tab, you will have a "Javascript/Protractor" link).
You will get a zip file with four files (you should add all of them to your version control system, alongside the code of the application you are testing):
- one for the configuration of hiptest-publisher to use the command-line tool
- one for all the tests (you can split them later on, using the --with-folders option in the config file)
- one for the action words: that's the place where you will do the automation
- one for storing the status of the action words you exported (which is used with hiptest-publisher to see which action words have been updated since the last update)
Once the action words are implemented, the test files generated can be integrated in your test suite like any other Protractor test.
On the Hiptest side itself, the only requirement you have is that your tests should only be written using action words only. From what I understand from your post, you do not work directly in Hiptest yourself and you only manage the automation part (or did I get that wrong ? )
For pushing the execution results back to Hiptest, the principle is pretty simple:
- create a test run dedicated to the CI
- run the command "hiptest-publisher --config-file --test-run-id " before the tests (so only the tests inside the test run are executed, you do not want to run a test that someone is currently writing to be executed on fail of course)
- run your tests
- run the command "hiptest-publisher --config-file --push " to push the results back to hiptest.
Note that those two commands (including the test run ID) can be found directly inside Hiptest, from the "Automate" button in the test run.
If you have an Hiptest account, you can contact us directly on the chat, that might be easier to help you through the process.
Ho and I have a recording of the last webinar I made about automation, I guess you could find some useful information there too :)

Selenium automation report

I am using Selenium framework for my test cases execution.
I need an instant report of test cases that are passed while the full suite is in execution currently.
For Eg: There are 100 test cases in suite and five have run of which 3 passed, 2 failed and I need these instant report while the suite is in-progress. Can you please help me with this task?
You can use ExtentReport.
You can use it to log your test steps and once its done it will generate a report to show your results.
For what your looking for, ExtentReport uses a "flush".
If you call this flush after each test step it will amend the step and create the report.
This is something I'm looking into myself at the moment, so I wouldn't consider this an answer but something I've stumbled across myself, hope it helps.
Here is how to set up ExtentReports on your project with examples - http://www.ontestautomation.com/creating-html-reports-for-your-selenium-tests-using-extentreports/
You must use it in conjunction with a test runner eg. TestNG or JUnit.
For what you are trying to achieve is slightly different to the example. You need to call a flush after every test step so it will amend to the report after the step is completed rather than when all the tests are completed. Its not something I have done before but it was explained to me like the following
Just call .flush() after every test instead of once at the end of your test run. BUT you need to make sure the ExtentReports object itself is only initialized once, instead of being reinitialized at the start of every test. For example, I used TestNG. The ExtentReports is called once using #BeforeSuite, but the .flush() is called after every test using #AfterMethod. I hope this makes sense.
The only thing that can’t be solved via code is the HTML refresh as this is outside the control of the ExtentReports library (it doesn’t know where you’ve opened the actual HTML file). But this can be taken care of by using a simple browser plugin as I said. At least for Chrome there are a lot of them, just do a Google search for ‘chrome auto refresh’.
Hope this helps. If you need anymore advice don't hesitate to contact me.

code check system using ace code editor and angularjs

I am in the middle of a project where we want to use ace code editor embedded in the browser. I would like to implement it just like how codeschool or any other teaching platform do using ace library. I want users to solve a given prompt in the code editor and want to grab it and run some test in the background before giving the result back to the result window. I am new to this field and would like to get some advice from someone who has the similar experience. Can anyone let me know where I can start and like a brief summary of flow I should follow? e.g
user solve the prompt
user hit "Run or Submit" button
the code will be delivered to a server that handles the result or it will be handled on the client side.
give the user the result of the prompt.

WPF and ICUTest unit tests

Hi I am evaluating ICUTest for use on a project. My initial view is that it looks like a promising Visual testing library. The scenario I have for using ICUTest is to start an application with a specific configuration and I expect the main application window to display based on the configuration settings. Each unit test should start the application and then after completing it should shutdown the application gracefully.
At the moment I can get individual tests to run, but when I run multiple tests I start running into all types of threading issues. Has anyone had any experience with this?
There are two ways to test your application.
1) The easiest (and most reusable) way is to just test your main app window like any other window. Do your initialization after a window event (like Window.Loaded) or through the constructor (e.g. new MainWindow("myapp.config") ).
2) If initialization must be done before the window is up then you can start the app thread with code similar to the one here.
Note: in WPF, you can only start an Application once, so method (1) is preferable.
Also, make sure you wrap all your GUI related calls in an ICU.Invoke(...) block.

Resources